Hi, I'm 'upping' this discussion for two reasons :
- I didn't send any response before ! I didn't know that some parts of V8 were self-hosted, so I'm glad to have learn that. Thanks. : ) - I've just read this article [1] on the web, and it reminds me this discussion. The author is explaining a valid use case of mutable functions (preventing useless garbage collection). It's true that in real time application, garbage collection consume a lot of processing time (factories or persistent objects are not uncommon [2] [3] [4]). What do you think about this ? [1] http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript [2] https://github.com/arcanis/spark.js/blob/master/lib/factory.js [3] https://github.com/zz85/sparks.js/blob/master/Sparks.js#L847 [4] https://github.com/mrdoob/three.js/blob/master/src/core/Matrix4.js#L1038 On 9 March 2012 00:02, Rick Waldron <[email protected]> wrote: > > > On Thu, Mar 8, 2012 at 12:19 PM, David Bruant <[email protected]> wrote: > >> Le 08/03/2012 18:02, Maël Nison a écrit : >> >> Shouldn't native versions be more efficients ? >>> >> I heard V8 is on the path of self-hosting (writing standard functions in >> JavaScript itself) as much as it can (can anyone confirm?). >> > > Confirmed. > > http://code.google.com/p/v8/source/browse/trunk/src/array.js > > > >> >> It seems that in some cases, there is actually no benefit in writing in >> C++ and a JavaScript-based solution can be 60% faster [1] [2]. This example >> is DOM, but I wouldn't be surprised if it was true for some ECMAScript >> functions. >> >> Also, specifically, I would intuit that performance should not be that >> different for mutation methods while it does change for methods that create >> a new array since the engine can pre-allocate of correct size right away >> (control that we don't have in JavaScript). >> >> Regardless, performance had changed so quickly over tha last years that >> I'm not sure any guess on performance is really accurate for long. >> >> David >> >> [1] >> https://twitter.com/#!/**jdalton/status/**165618550868946944<https://twitter.com/#!/jdalton/status/165618550868946944> >> [2] >> https://twitter.com/#!/**jdalton/status/**165914543418126336<https://twitter.com/#!/jdalton/status/165914543418126336> >> >> ______________________________**_________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss> >> > > -- Maël Nison Epitech 2014, Paris - Astek
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

