efficient input range buffering
Christophe
travert at phare.normalesup.org
Sun Oct 2 08:07:04 PDT 2011
"Martin Nowak" , dans le message (digitalmars.D:145927), a écrit :
> I've written a wrapper to promote input ranges to buffered forward ranges.
> It allows to write range agnostic lexers/parsers with infinite lookahead.
>
> Buffering is done through a singly linked list of memory blocks that are
> reference counted.
> Each saved range holds a reference to all future blocks.
> Blocks are recycled when being no longer used.
>
> https://gist.github.com/1257196
>
> There is a major issue with the somewhat broken implicit-save-through-copy
> concept.
> A lot of copies in function parameters, foreach loops etc. will also create
> references and thus can be easily responsible for inefficiencies.
>
> martin
I'll be glad to have a look at this code, but a minimum of documentation
would be nice.
More information about the Digitalmars-d
mailing list