Skip to content

Commit 1baa996

Browse files
author
llgoer
committed
添加基准测试相关内容
1 parent 35b54bd commit 1baa996

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ QuickJS Javascript引擎
66

77
* [1 简介](#Introduction)
88
* [1.1 主要功能](#Main-Features)
9+
* [1.2 基准测试](#bench)
910
* [2 用法](#Usage)
1011
* [2.1 安装](#Installation)
1112
* [2.2 快速入门](#Quick-start)
@@ -74,6 +75,10 @@ QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2019规范
7475
* 在Javascript中实现的具有上下文着色和完成的命令行解释器。
7576
* 采用C包装库构建的内置标准库。
7677

78+
### 1.2 基准测试
79+
80+
点击查看[QuickJS基准测试](bench.md)具体内容
81+
7782
2 用法
7883
-------
7984

bench.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# QuickJS基准测试
2+
3+
结果
4+
-------
5+
6+
这里是 [bench-v8 version 7 benchmark](https://github.com/v8/v8/tree/master/benchmarks)的测试结果
7+
8+
| 引擎 | QuickJS<br/>2019-06-23 | DukTape<br/>2.3.0 | XS<br/>8.8.0 | MuJS<br/>1.0.6 | JerryScript |
9+
| ---------------------------- | ---------------------- | ----------------- | ------------ | -------------- | ----------- |
10+
| Richards | 777 | 218 | 444 | 187 | 238 |
11+
| DeltaBlue | 761 | 266 | 553 | 245 | 209 |
12+
| Crypto | 1061 | 202 | 408 | 113 | 255 |
13+
| RayTrace | 915 | 484 | 1156 | 392 | 286 |
14+
| EarleyBoyer | 1417 | 620 | 1175 | 315 | - |
15+
| RegExp | 251 | 156 | - | - | - |
16+
| Splay | 1641 | 1389 | 1048 | 36.7 | - |
17+
| NavierStokes | 1856 | 1003 | 836 | 109 | 394 |
18+
| **Total score** | 942 | 408 | - | - | - |
19+
| Total score<br/>(w/o RegExp) | 1138 | 468 | 738 | 159 | - |
20+
21+
(分数越高越好).
22+
23+
测试细节
24+
------------
25+
26+
所有经过测试的JS引擎都是解释器,并且运行资源有限。
27+
28+
bench-v8源代码在QuickJS测试档案(`tests/bench-v8`目录)中提供。
29+
30+
在Fedora 21上使用gcc 4.9.2编译所有程序。它们在3.2 GHz的Core i5 4570 CPU上运行。
31+
32+
* [QuickJS](https://bellard.org/quickjs): version 2019-07-09, qjs executable, x86, 64 bits, compiled with -O2.
33+
* [DukTape](https://duktape.org/): version 2.3.0, duk executable, x86, 64 bits, compiled with -O2.
34+
* [XS](https://github.com/Moddable-OpenSource/moddable): version 8.8.0, xst executable, x86, 64 bits, compiled with -O3. The engine cannot correctly run the RegExp test, so it was disabled.
35+
* [MuJS](https://mujs.com/): version 1.0.6, mujs executable, x86, 64 bits, compiled with -O2. The engine cannot correctly run the RegExp test so it was disabled. JS\_STACKSIZE and JS\_ENVLIMIT were increased to 32768 to run EarleyBoyer.
36+
* [JerryScript](http://jerryscript.net/): git version 2b8c4286, jerry executable, x86, 64 bits. The engine could not run EarleyBoyer, RegExp and Splay.
37+
38+
运行基准测试,可以按需添加其他Javascript引擎。

0 commit comments

Comments
 (0)