Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion The Most Efficiency Method Inter-Process-Communication
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris  
View profile  
 More options Apr 28 2011, 8:32 am
From: Chris <cohar...@gmail.com>
Date: Thu, 28 Apr 2011 05:32:49 -0700 (PDT)
Local: Thurs, Apr 28 2011 8:32 am
Subject: Re: The Most Efficiency Method Inter-Process-Communication
How does a straight `eval(json)` compare to `JSON.parse(json)` for
unpacking?

On Apr 28, 2:54 pm, billywhizz <apjohn...@gmail.com> wrote:

> interestingly, node v0.4.6 built with v8 3.3.2 which should have
> crankshaft enabled on 64 bit is slightly quicker for stringify and
> quite a bit slower for parse:

> node 0.4.6/v8 3.3.2
> json    pack:   1318 ms
> json    unpack: 1039 ms

> node.0.4.6/v8 3.1.8.10
> json    pack:   1487 ms
> json    unpack: 851 ms

> On Apr 28, 5:02 am, Chris <cohar...@gmail.com> wrote:

> > I use a modified version of kriszyp's multi-node that enables 2-way
> > communication

> > Source is here:https://github.com/chriso/node.io/blob/master/lib/node.io/multi_node.js

> > You set it up like this:https://github.com/chriso/node.io/blob/master/lib/node.io/processor.j...

> > Then just use `master.send(msg)` or `workers[i].send(msg)`

> > It's been more than fast enough.

> > On Apr 28, 1:43 pm, billywhizz <apjohn...@gmail.com> wrote:

> > > interesting. i am seeing the same speedup. the benchmark on msgpack
> > > github is way out of date. i tested here using an old 0.1.96 version
> > > of node versus latest 0.4.7 on 64 bit with v8 v3.1.8.10 and saw the
> > > following results for peter's bench.js script (i just ran the JSON
> > > tests not the msgpack ones):

> > > v0.1.96:
> > > json    pack:   6787 ms
> > > json    unpack: 11888 ms

> > > v0.4.7:
> > > json    pack:   1487 ms
> > > json    unpack: 851 ms

> > > That's almost 8x faster for JSON.stringify and almost 14x faster for
> > > JSON.parse. This is very nice indeed!

> > > On Apr 28, 3:42 am, Aikar <xdr...@gmail.com> wrote:

> > > > Just throwing in my recent findings,
> > > > V8 has apparently done a massive performance boost on JSON.

> > > > msgpack is now alot slower than JSON

> > > > see:https://github.com/aikar/wormhole/issues/3

> > > > I had a good streaming msgpack parser implemented doing 50k messages/
> > > > sec, and switching to json tripled the speed.

> > > > On Apr 27, 9:30 pm, billywhizz <apjohn...@gmail.com> wrote:

> > > > > Thanks Matt. had a google but there doesn't seem to be much definitive
> > > > > info out there. i'd wager for large message sizes a unix socket should
> > > > > be quite a bit faster but if sending lots of small messages, you
> > > > > probably won't see a whole lot of difference.

> > > > > Justin, the best way to answer a question like this is to do the
> > > > > testing yourself based on the system/environment you are optimizing
> > > > > for. There's no way to give a definitive general answer to your
> > > > > question.

> > > > > anyway, i'll see what kind of benchmark i can throw together - i'm
> > > > > more interested in the cost of serialization differences myself.

> > > > > On Apr 28, 1:44 am, Matt <hel...@gmail.com> wrote:

> > > > > > On Wed, Apr 27, 2011 at 8:19 PM, billywhizz <apjohn...@gmail.com> wrote:
> > > > > > > does TCP over loopback on linux really not hit the network stack?
> > > > > > > doesn't it do packet framing, checksums and protocol handshakes etc? i
> > > > > > > can't find any reference to this, so if you have one, please let me
> > > > > > > know.

> > > > > > AFAIK it's optimised to not go through the network driver layer (so it still
> > > > > > goes through parts of the stack, but is optimised so that it doesn't have to
> > > > > > talk to hardware). But this is just a memory from when I used to read the
> > > > > > Kernel change logs years and years ago.  I can't find any reference to it
> > > > > > online now.

> > > > > > Matt.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.