Skip to content

shaikrasheed99/javascript-iterations-performance-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Performance test of JavaScript iterations

We have few techniques to iterate over the arrays, objects and strings.

Tested the each technique with 1 Million iterations and executed the test.js file for 5 times using the for i in {1..5}; node test.js; command.

Results

  • While loop - 1.4ms
  • Do while loop - 0.8ms
  • For loop - 0.8ms
  • For Of loop - 9.5ms
  • For In loop - 137ms
  • Map method - 8.5ms
  • Filter method - 7.2ms
  • Reduce method - 6.4ms
  • Sort method - 11.7ms
  • Every method - 7.2ms
  • Some method - 6.8ms
  • Chaining methods - 16.3ms

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy