+new Date vs Date.now() vs performance.now()
JavaScript performance comparison
Info
https://twitter.com/jaffathecake/status/306706682552143872
jaffathecake: Avoid "+new Date" to generate timestamps during animation. Use "Date.now()" or "performance.now()" instead http://t.co/Hle0qzxWeZ
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Date.now |
|
pending… |
+new Date() |
|
pending… |
performance.now() |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Noxoc
- Revision 2: published
- Revision 3: published by Oliver Clevont
- Revision 5: published
- Revision 6: published by Boris
- Revision 7: published by Country
- Revision 8: published
- Revision 9: published by Mitch
0 comments