September 24
On 24/09/2025 11:48 AM, Dennis wrote:
>     My general approach is to make it work first, not worrying too much
>     about algorithms.
> 
>     (...)
> 
>     It paid off to not be too pre-judgmental about what time it would take.
> 
> Which is why it puzzles me:
> 
> There's a simple, classic algorithm that runs in linear time, which is pre-judged to be slow because there's array concatenation in it.

When the problem space has a known finite lifetime, like the case for dmd's AST, to its global object.
There is a solution to this particular problem: inlined linked lists.

I use them heavily for any compiler type problems that I do. They work great, even if they cost a tiny bit more ram.

They work out to be very cheap, and basically non-existant in terms of cost during iteration.

At least when applied to stuff like the algorithms me and Dennis presented wrt. deferred logic.

1 2 3 4 5 6
Next ›   Last »