digitalmars.D.learn - ctfe append too slow, but can't speed up
- Jethro (9/9) Apr 10 2017 ctfe string appending is way to slow, I have tried the suggested
- Adam D. Ruppe (5/7) Apr 10 2017 There is no memory reuse in CTFE right now, that's why the engine
- Stefan Koch (3/12) Apr 12 2017 You can give me your code, and I'll see what has to be done to
ctfe string appending is way to slow, I have tried the suggested methods and nothing works and slows down by at least an order of magnitude. I need a drop in replacement(no other changes) that can take over the duties of string and allow for memory reuse. reserve, cpacity, assumeSafeAppend cannot be used by ctfe so are useless. I've tried to shadow a pre-allocated buffer but that doens't work either.
Apr 10 2017
On Tuesday, 11 April 2017 at 02:20:37 UTC, Jethro wrote:I need a drop in replacement(no other changes) that can take over the duties of string and allow for memory reuse.There is no memory reuse in CTFE right now, that's why the engine is being rewritten... I'd suggest writing a regular runtime program to output the code while you wait for the new ctfe engine to be released.
Apr 10 2017
On Tuesday, 11 April 2017 at 02:20:37 UTC, Jethro wrote:ctfe string appending is way to slow, I have tried the suggested methods and nothing works and slows down by at least an order of magnitude. I need a drop in replacement(no other changes) that can take over the duties of string and allow for memory reuse. reserve, cpacity, assumeSafeAppend cannot be used by ctfe so are useless. I've tried to shadow a pre-allocated buffer but that doens't work either.You can give me your code, and I'll see what has to be done to run it with newCTFE.
Apr 12 2017