Skip to content

Commit 8180d3d

Browse files
committed
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(),
1 parent 78db49c commit 8180d3d

File tree

2 files changed

+291
-99
lines changed

2 files changed

+291
-99
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,25 @@ testall-32: all test-32 microbench-32 test2o-32 test2-32
525525

526526
testall-complete: testall testall-32
527527

528+
node-test:
529+
node tests/test_closure.js
530+
node tests/test_language.js
531+
node tests/test_builtin.js
532+
node tests/test_loop.js
533+
node tests/test_bignum.js
534+
535+
node-microbench:
536+
node tests/microbench.js -s microbench-node.txt
537+
node --jitless tests/microbench.js -s microbench-node-jitless.txt
538+
528539
bench-v8: qjs
529540
make -C tests/bench-v8
530541
./qjs -d tests/bench-v8/combined.js
531542

543+
node-bench-v8:
544+
make -C tests/bench-v8
545+
node --jitless tests/bench-v8/combined.js
546+
532547
tests/bjson.so: $(OBJDIR)/tests/bjson.pic.o
533548
$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)
534549

0 commit comments

Comments
 (0)