December 14, 2016
On Tuesday, 13 December 2016 at 12:04:31 UTC, Stefan Koch wrote:
> I made good progress on function calls today.
> By deferring them we get both better bytecode-generator performance and simpler code.
> Since the deferring step seems to work, you can expect calls to work by the end of next week.
>
> When function-calls work, I will direct efforts towards correct handling of || and &&,
> since it is very annoying to work around the lack of them :)
>
> Also start-up times for ctfe are still dropping.
> When the old ctfe is completely replaced, (hopefully around February)
> I can reasonably expect compile-times to be reduced by over 65% (given that ctfe was the bottleneck)
>
> Cheers,
> Stefan

String-Switches are supported now.

And just to make a point why I am pissed about templates sometimes :
The following paste contains the IR generated by a Phobos template which was miscompiled until very recently.

oh ...  pastie does not accept more then 64K :(
Ah pastebin does.
http://pastebin.com/Jfh1NH3m

December 15, 2016
On Tuesday, 13 December 2016 at 07:21:07 UTC, Stefan Koch wrote:
> Hi Guys, I just fixed the LLVM-Backend a little.
> It's about 4000 times slower to start up then the interpreter.
> And has 1000 microseconds overhead per evaluation.
>
> If you don't want to run a raytracer at compiletime I doubt that the llvm backend is the right one for you.
>
> That said, it's a great fit for getting started in compiler development.
> It can also be used to show potential optimization our own peephole optimizer could do.
>
> The llvm backend will currently not run the whole test-suite because it fails on ++ (because of a missing load-store cycle I suspect)...
> The strange thing here is, that it only fails sometimes :)

Do you use MCJIT or some special sauce made with Orc ?

Anyway, yes, LLVM's JIT is heavy duty, good for long running code but probably not so much for CTFE which are mostly one shot.

December 15, 2016
On Wednesday, 14 December 2016 at 08:40:34 UTC, Stefan Koch wrote:
> String-Switches are supported now.

Cool, this is a crucial requirement for pattern matching in parser generators, like Pegged and alikes. Is it worth giving newCTFE a try with these things now?

December 15, 2016
On Thursday, 15 December 2016 at 09:21:10 UTC, Nordlöw wrote:
> Cool, this is a crucial requirement for pattern matching in parser generators, like Pegged and alikes. Is it worth giving newCTFE a try with these things now?

BTW, does newCTFE string-switches use O(1) lookups?
December 15, 2016
On Thursday, 15 December 2016 at 09:23:07 UTC, Nordlöw wrote:
> On Thursday, 15 December 2016 at 09:21:10 UTC, Nordlöw wrote:
>> Cool, this is a crucial requirement for pattern matching in parser generators, like Pegged and alikes. Is it worth giving newCTFE a try with these things now?
>
> BTW, does newCTFE string-switches use O(1) lookups?

Nope. Currently it lowers to an if else chain.
Which is O(N), though still faster then calling the runtime :)

I just fixed Assigning static arrays  from ArrayLiterals.
....
And now the phobos-compiletime tests pass!

December 15, 2016
On Thursday, 15 December 2016 at 06:04:12 UTC, deadalnix wrote:
> On Tuesday, 13 December 2016 at 07:21:07 UTC, Stefan Koch wrote:
>
> Do you use MCJIT or some special sauce made with Orc ?
>
> Anyway, yes, LLVM's JIT is heavy duty, good for long running code but probably not so much for CTFE which are mostly one shot.

MCJIT, mostly orc is not available with the old set of sdc-llvm headers I happen to use.
Orc is too much of a pain to setup if you are not planning on rolling with llvm to begin with.
Also LLVM has a but of weirdness to it. Where it'll miscompile perfectly valid code.
(I happen to use llvm 3.4)
December 15, 2016
On Thursday, 15 December 2016 at 12:06:46 UTC, Stefan Koch wrote:
> I just fixed Assigning static arrays  from ArrayLiterals.
> ....
> And now the phobos-compiletime tests pass!

Wonderful! I just realized that fast string-switch is only necessary for parse generators when the generated parse is evaluated at compile-time :)
December 15, 2016
On Thursday, 15 December 2016 at 12:06:46 UTC, Stefan Koch wrote:
> And now the phobos-compiletime tests pass!

How do you run the phobos compile-time tests?

make unittest does do it all right?
December 15, 2016
On Thursday, 15 December 2016 at 13:38:36 UTC, Nordlöw wrote:
> On Thursday, 15 December 2016 at 12:06:46 UTC, Stefan Koch wrote:
>> And now the phobos-compiletime tests pass!
>
> How do you run the phobos compile-time tests?
>
> make unittest does do it all right?

yes.
I run make -f posix.mak unittest.

December 16, 2016
On 12/15/16 10:21 AM, Nordlöw wrote:
> On Wednesday, 14 December 2016 at 08:40:34 UTC, Stefan Koch wrote:
>> String-Switches are supported now.
>
> Cool, this is a crucial requirement for pattern matching in parser
> generators, like Pegged and alikes. Is it worth giving newCTFE a try
> with these things now?
>

Afaik string switches are implemented as a fairly slow hash table. Optimal solutions like building a trie would be a nice enhancement.

---
Dmitry Olshansky