>
> Once you have some proper benchmarks, it might be fun to compare GoAWK's
> performance to that of my awk package <https://github.com/spakin/awk>.
>

Nice -- will do!

I don't know how much performance difference this makes in practice, but my
> value struct (also in a value.go file) lazily converts among strings,
> floats, and ints and caches the conversions.  I don't keep track of "the"
> type of a value (your typ field), just whether I have a currently valid
> string/float/int representation.
>

Interesting approach. I hope to try out different value representations,
but from a quick profiling run I don't think that's the bottleneck right
now (using maps for variables is).

No need to change your lexer/parser at this stage, but I've recently grown
> quite fond of PEG parsers
> <https://en.wikipedia.org/wiki/Parsing_expression_grammar>.  These are a
> lot like hand-rolled, recursive-descent parsers so they're relatively easy
> to wrap your head around and reasonably powerful but require less
> code/effort than actually rolling your own.  For Go, I've used pigeon
> <https://github.com/mna/pigeon> for a few projects (e.g., edif2qmasm
> <https://github.com/lanl/edif2qmasm>, for which a PEG parser is probably
> overkill).  I like pigeon, but I admit I didn't do a thorough analysis of
> all the available PEG parsers for Go before going with that one.
>

I'll check them out.

Nice work!
>

Thanks!

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to