join() in CTFE very low performance

monkyyy crazymonkyyy at gmail.com
Sat Jan 4 21:36:07 UTC 2025


On Saturday, 4 January 2025 at 19:54:19 UTC, realhet wrote:
> 
> It looks like they discover their parameter signatures every 
> time from zero.
>
> Maybe those 'lazy wrappers' you mentioned can be inside text()?

While it usually would be correct to assume Im being informal, in 
this case I wasn't; form functional programming "lazy" v "eager" 
are formal terms in english; idk what they are in chinese.

That is the definition. I suggest adding in memorized: and for 
any computation you can have the following outcomes:

lazy: may run 0, or infite amount of times, doesnt allocate

eager: will run once, will always allocate

memo: may run 0 or once, may allocate

There are times when ct is worse when lazy but the std is(and 
should stay) default lazy, so Id suggest a pattern of typing your 
enums `enum string foo=...`, to attempt to get an eager result


More information about the Digitalmars-d-learn mailing list