Git Product home page Git Product logo

Comments (5)

Pokute avatar Pokute commented on May 14, 2024 1

This is more of a case of optimisation or dead code elimination.

   let foo = 10;
   foo = /* InsanelyComplicatedAndIntensiveCalculationWithNoSideEffects. */
   foo = 20;

A good JS engine will completely skip the first two assignments.

The fact that results change so dramatically from code that's outside the timing block is a telltale sign that some dead code elimination is taking place. But this test case's purpose is not to measure dead code elimination. It's purpose is to inform which method is the fastest for users, who use the code in real world situations where they do care about and do use the end result of map operation and thus dead code elimination will not occur.

from performance-analysis-js.

Pokute avatar Pokute commented on May 14, 2024 1

@dg92
I strongly suggest you watch the following video on profiling / optimisations:
LXJS 2013 - Vyacheslav Egorov - Performance and benchmarking

from performance-analysis-js.

dg92 avatar dg92 commented on May 14, 2024

@Pokute if you spend time reading the note in readme then you might not have to create an issue
Note
These results are computed using Node V8 v5.8.283.41
These result does not consider the JIT, inline caching, hidden classes, deoptimizations, garbage collection, pretenuring etc.
Result may vary as per env's.

Hope that answer the variation

from performance-analysis-js.

dg92 avatar dg92 commented on May 14, 2024

@Pokute
feel free to cheeckout this branch - https://github.com/dg92/Performance-Analysis-JS/tree/feature/ramda-gc-cache

from performance-analysis-js.

dg92 avatar dg92 commented on May 14, 2024

@Pokute sure thanks for sharing.

Open to accept the MR if you feel it will bring a positive change.

from performance-analysis-js.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.