[antlr-interest] BENCHMARK. ANTLR. Bad results.

Alex Sedow alexsedow at mail.ru
Sat Nov 13 01:56:33 PST 2004


> On 11/13/04 11:29 AM, "Alex Sedow" <alexsedow at mail.ru> wrote:
>
> >>> Of course, ANTLR/C++ must use its own string. Because custom string
may
> >>> speed up parsing speed about 3-4 times. In my parsers I use special
hash
> >>> string class. All structures (tokens, AST nodes) contains smart
pointers
> > to
> >>> hash strings.
> >>> Hash string internals:
> >>> offset, size, comment
> >>> 0, 4, hash code <- pointers refers there
> >>> 4, 4, reference counter
> >>> 8, 4, string length
> >>> 12, N, string (where N is sizeof of ASCIIZ string)
> >>
> >> Hmm. So you also copy strings? Why not simply pointer(s)?
> >
> > No string copying. I use reference counter pointers that refers to
string
> > (string described above).
>
> I think you mean when you copy YOUR strings.
>
> But what is this?
>
>    12, N, string (where N is sizeof of ASCIIZ string)
>
> As I understand -- this is copy of some word/token which you get from
> original string. Right ?
>
> So on creation of YOUR string instance, you make copy.
> Right?
>

Yes, I copy string one time (when create) from source file (like C# source),
to structure.

>
> --
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list