On Tue, Jun 12, 2012 at 10:47 PM, Stewart Mckinney <lordma...@gmail.com>wrote:

> A key thing to understand about v8 is that it JIT compiles your Javascript
> straight into machine language ( via the meta-lang pipeline: Crankshaft->
> Helium-> Lithium ). This makes context switches far, far more costly,
> because v8 does not actually deal directly ( much ) with its abstractions.
> It does use them in formulation but then discards them when no longer
> needed. This means if you go a-fetching v8 has to do some searching and
> constructing before it can make your switch, unless you've asked v8 to
> 'hold onto' something ( which in turn, slows down the VM slightly via the
> GC and forces some parts of the VM to not optimize because your essentially
> telling the interpreter "this is volatile" ). This is part of the reason
> why v8 encourages you to use Local Handles whenever possible.
>
> The smackdown here isn't that hard  - your looking at about 0.00032ms or
> so ( off the top of my head ) - but you take an array of say, a million
> elements, and there you go. Suddenly your looking at 1/3 seconds time just
> to iterate over a massive JS array in C++.
>

Sure, but IIRC neither NumPy nor PDL concepts of Arrays/Vectors/whatever
are strictly language native. So it's basically the same as a Buffer.

(sorry I guess this should be another thread).

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to