Javascript performance by processor type

I am wondering if anyone knows about a tool or database that will give me relative javascript performance based on processor type. I am trying to explain to my boss that we need to improve performance on some of our web pages. These pages work fine on all the top-level hardware that we have in the office, but I suspect our user base has a lot more performance issues that are firing. My goal is to show something like:

i7 @ 3.8ghz - completes javascript benchmark X in 1 minutes
i5 @ 2.2ghz - completes javascript benchmark X in 2 minutes
i3 @ 1.6ghz - completes javascript benchmark X in 4 minutes

I don't have the hardware to run these tests myself, but with a small library of relative performance based on the processor, I believe I can extrapolate. Thank!

PS - I understand that many factors affect the performance of js, but I would like something to be isolated from the processor speed, since this is the limiting factor in my particular use case.

+4
source share
1 answer

I was looking for the answer to your question. There is jsperf.com which contains many javascript tests. Unfortunately, they only check the type of browser and its performance. You can find a test with many results so you can find out how well others performed.

You can even do your own jsperf test and test it on other computers.

Please note that the results depend on many parameters:

  • What is a processor?
  • ? (jsperf )
  • / ( javascript)
  • ( GB ram, .
  • ,

Firefox 28
Windows 7, 64bit
AMD Phenom II x4, 2.8Ghz

jsperf: http://jsperf.com/native-vs-array-js-vs-underscore/8.

native
    672,225 ±8.17%fastest
array.js
    663,733 ±7.74%0.87% slower
underscore
    622,637 ±7.96%7% slower
lo-dash
    552,168 ±7.28%17% slower

sunspider: https://www.webkit.org/perf/sunspider/sunspider.html , ( ) . , . :

============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total:                  285.1ms +/- 16.7%
--------------------------------------------

  3d:                    45.7ms +/- 4.9%
    cube:                16.2ms +/- 8.0%
    morph:                9.7ms +/- 3.6%
    raytrace:            19.8ms +/- 5.6%

  access:                20.2ms +/- 3.3%
    binary-trees:         3.1ms +/- 7.3%
    fannkuch:             8.4ms +/- 4.4%
    nbody:                4.2ms +/- 7.2%
    nsieve:               4.5ms +/- 8.4%

  bitops:                14.3ms +/- 4.7%
    3bit-bits-in-byte:    1.3ms +/- 26.6%
    bits-in-byte:         4.5ms +/- 8.4%
    bitwise-and:          2.0ms +/- 0.0%
    nsieve-bits:          6.5ms +/- 5.8%

  controlflow:            2.6ms +/- 14.2%
    recursive:            2.6ms +/- 14.2%

  crypto:                21.9ms +/- 6.4%
    aes:                 10.0ms +/- 10.7%
    md5:                  6.7ms +/- 5.2%
    sha1:                 5.2ms +/- 5.8%
  date:                  36.7ms +/- 30.1%
    format-tofte:        15.1ms +/- 3.5%
    format-xparb:        21.6ms +/- 50.9%
  math:                  22.7ms +/- 3.0%
    cordic:               4.9ms +/- 4.6%
    partial-sums:        15.0ms +/- 3.2%
    spectral-norm:        2.8ms +/- 10.8%
  regexp:                14.8ms +/- 4.4%
    dna:                 14.8ms +/- 4.4%

  string:               106.2ms +/- 46.4%
    base64:               9.8ms +/- 9.6%
    fasta:               10.8ms +/- 5.2%
    tagcloud:            24.3ms +/- 6.7%
    unpack-code:         30.4ms +/- 10.9%
    validate-input:      30.9ms +/- 150.4%

, . , . !

+4

Source: https://habr.com/ru/post/1537953/


All Articles