]> git.kaiwu.me - quickjs.git/commit
Improve microbench.js
authorCharlie Gordon <github@chqrlie.org>
Sun, 25 Feb 2024 23:14:31 +0000 (00:14 +0100)
committerCharlie Gordon <github@chqrlie.org>
Sun, 25 Feb 2024 23:14:31 +0000 (00:14 +0100)
commit8180d3dd879aeafa9fcd479ad174de88e73b3d15
tree692c16f20255c9f77bf2b26c94ee5307b7648af6
parent78db49cf9543b983d5f0edf361cbfe907451c826
Improve microbench.js

- ensure handler behavior does not depend on n argument
- load and save reference file in node.js
- add -s filename option to name the output reference file
- add targets in Makefile for tests and bencharks using node.js
- fix incorrect timings when not using high resolution timer
- use performance timer in node.js
- output performance factor instead of percentage
- use smaller threshold by default
- add benchmarks for:
    date_parse(), prop_update(), prop_clone(), array_slice()
    global_func_call(),
Makefile
tests/microbench.js