On Thursday, 30 June 2016 at 10:28:03 UTC, Stefan Koch wrote:
Hi,

I recently had a breakthrough in my CTFE work.

Though because habits die hard.
I am writing the bytecode-engine in a CTFEable style.
Therefore I can be used as a quite comfortable IR for CTFE things as well.

It should be fairly easy to generate a inline-asm-string from the byteCode at compiletime. And thereby creating the possibility of generating optimized code at compile-time.

I was wondering if such a thing would fit in phobos.

Please share your opinions with me :)

Regards,
Stefan

I think that's a great idea! It could be also useful for further optimizing ctRegex, among other things.

But I agree with others - please put it on DUB first so we can test it more widely before it's ready for Phobos. As we all know getting something accepted into Pbobos is not a walk in the park, unless you already have the perfect design: http://dlangcomicstrips.tumblr.com/image/128280515097
:D

BTW AFAIK @9il has done something similar for his BLAS library. His code generates inline LLVM IR at CT for LDC and generates vanilla D code for DMD.

Some realated discussions:
https://github.com/ldc-developers/ldc/issues/1438
https://github.com/ldc-developers/ldc/issues/1482

Reply via email to