On Monday, 26 April 2021 at 13:17:49 UTC, FeepingCreature wrote:
On Sunday, 25 April 2021 at 21:27:55 UTC, sighoya wrote:
On Monday, 19 April 2021 at 06:37:03 UTC, FeepingCreature wrote:
Native CTFE and macros are a beautiful thing though.

What did you mean with native?

When cx needs to execute a function at compiletime, it links it into a shared object and loads it back with dlsym/dlopen. So while you get a slower startup speed (until the cache is filled), any further calls to a ctfe function run at native performance.

Ah okay, but can't Dlang runtime functions not anyway called at compile time with native performance too?

So generally, cx first parses the program, then filters out what is a macro, then compiles all macro/ctfe functions into shared lib and execute these macros from that lib?

Isn't it better to use the cx compiler as a service at compile time and compile code in-memory in the executable segment (some kind of jiting I think) in order to execute it then.
I think the cling repl does it like that.

And how does cx pass type objects?



  • Silicon Valley D Meetup - ... Ali Çehreli via Digitalmars-d-announce
    • Re: Silicon Valley D ... Gavin Ray via Digitalmars-d-announce
      • Re: Silicon Valle... Ali Çehreli via Digitalmars-d-announce
        • Re: Silicon V... Ola Fosheim Grostad via Digitalmars-d-announce
          • Re: Silic... FeepingCreature via Digitalmars-d-announce
            • Re: ... Ola Fosheim Grøstad via Digitalmars-d-announce
              • ... FeepingCreature via Digitalmars-d-announce
                • ... Ola Fosheim Grøstad via Digitalmars-d-announce
            • Re: ... sighoya via Digitalmars-d-announce
              • ... FeepingCreature via Digitalmars-d-announce
                • ... sighoya via Digitalmars-d-announce
                • ... FeepingCreature via Digitalmars-d-announce
                • ... sighoya via Digitalmars-d-announce
                • ... 12345swordy via Digitalmars-d-announce
    • Re: Silicon Valley D ... sighoya via Digitalmars-d-announce

Reply via email to