[erlang-questions] fast JSON parser in C
Chris Anderson
jchris@REDACTED
Wed Jul 30 03:52:33 CEST 2008
Robert,
Thanks for taking the time to optimize the unescape code. I think you
have to be seasoned in Erlang before you think to use recursive
pattern matching like that. I'll be looking for opportunities to work
like that in my code now.
For the curious, Robert's version is here http://gist.github.com/3212
and my original is here: http://gist.github.com/2353 (the Erlang term
format outputted by this parser is an attempt to match CouchDB's
current JSON conventions, although it would be trivial to adjust it to
output any of the EEP format options under discussion.)
It's a pleasant surprise to me that function dispatch is faster than
regex matching. Very cool.
--
Chris Anderson
http://jchris.mfdz.com
More information about the erlang-questions
mailing list