why is it different from clarinet or jsonparse[1]?

for what class of application is the difference meaningful?

would be happy to refer to this in the clarinet readme,

nuno


On Sun, Jun 1, 2014 at 12:27 PM, Bruno Jouhier <[email protected]> wrote:

> Hi Alex,
>
> No, I haven't tried C nor Go. The node and v8 API are exposed in C++.
> Developing with other languages is trickier (
> http://stackoverflow.com/questions/12088937/is-it-possible-to-write-node-js-addons-in-go).
> Why C or Go?
>
> If your concern is speed, I think that the next step is not to change
> language but to hook directly into v8's internals instead of going through
> v8's public APIs. This is how JSON.parse is implemented. I measured the
> total time spent in the public v8 materialization calls (creating strings,
> objects and arrays) and this time alone is equivalent to the total time
> used by JSON.parse.
>
> Bruno
>
>
> On Sunday, June 1, 2014 5:36:01 AM UTC+2, Alex Yaroshevich wrote:
>>
>> Hi Bruno!
>>
>> Did you tried to write it on C or Go?
>>
>> On Saturday, May 31, 2014 3:12:13 AM UTC+4, Bruno Jouhier wrote:
>>>
>>> I just released a first version of i-json, a fast incremental JSON
>>> parser: https://github.com/bjouhier/i-json
>>>
>>> Main features:
>>>
>>>    - It is FAST :-), but still slower than JSON.parse :-(. On my bench
>>>    (parsing a realistic 8 MB JSON file), it comes out as only 60% slower 
>>> than
>>>    JSON.parse. In comparison, the pure JS parsers that I have tried are more
>>>    than 6 times slower than JSON.parse.
>>>    - It is incremental and it works directly on buffers (on strings too
>>>    :-). So you can call it directly with buffers that you receive through
>>>    'data' events.
>>>    - It can work either as a DOM parser or an evented one (less events
>>>    than SAX but probably enough).
>>>    - API is small. The intent is not to provide a sophisticated API but
>>>    a fast engine around which you can build fancier APIs.
>>>    - It it implemented in C++ but there is a JS fallback implementation
>>>    in case it does not build. the JS implementation is 2.5 to 3 times 
>>> slower.
>>>    I wrote it in JS initially but was not happy with the speed. Both
>>>    implementations pass the unit test suite.
>>>
>>> Bruno
>>>
>>  --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/434777fb-9bcf-4cc8-bd37-caffb76b74b0%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/434777fb-9bcf-4cc8-bd37-caffb76b74b0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAKuqv0%3D63i3jy%3DQhKKo2HXQ70T%2B4mqu98qc-Z-8rRz1wN9UgAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to