Skip to content

Commit dcdc2b1

Browse files
authored
Add benchmarks (#1)
Add Octane, Kraken and SunSpider.
1 parent 97077a5 commit dcdc2b1

File tree

129 files changed

+532987
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+532987
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
quickjs
2+
build

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required(VERSION 3.9)
2+
3+
project(quickjs_bench LANGUAGES C)
4+
5+
add_subdirectory(quickjs EXCLUDE_FROM_ALL)
6+
link_libraries(qjs)
7+
8+
add_executable(run_sunspider_like run_sunspider_like.c)
9+
add_executable(run_octane run_octane.c)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
QuickJS Javascript Engine Benchmarks Suite
2+
3+
Copyright (c) 2023 Divy Srivastava
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1-
# Benchmarks
2-
QuickJS-NG benchmarks
1+
## `quickjs-ng/benchmarks`
2+
3+
Benchmarking https://github.com/quickjs-ng/quickjs
4+
5+
### Setup
6+
7+
```bash
8+
git clone https://github.com/quickjs-ng/benchmarks
9+
cd benchmarks
10+
11+
git clone https://github.com/quickjs-ng/quickjs
12+
13+
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_QJS_LIBC=ON
14+
cmake --build build
15+
```
16+
17+
### Usage
18+
19+
```bash
20+
# sunspider, kraken
21+
./build/run_sunspider_like <folder>/ <filter>
22+
23+
# octane
24+
./build/run_octane
25+
```
26+
Eg:
27+
28+
```bash
29+
./build/run_sunspider_like kraken-1.0/ ai-astar
30+
```
31+
32+
### SunSpider 1.0
33+
34+
```bash
35+
./build/run_sunspider_like sunspider-1.0/
36+
```
37+
38+
### Kraken
39+
40+
```bash
41+
./build/run_sunspider_like kraken-1.1/
42+
```
43+
44+
### Octane
45+
46+
```bash
47+
./build/run_octane
48+
```

kraken-1.0/LIST

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ai-astar
2+
audio-beat-detection
3+
audio-dft
4+
audio-fft
5+
audio-oscillator
6+
imaging-gaussian-blur
7+
imaging-darkroom
8+
imaging-desaturate
9+
json-parse-financial
10+
json-stringify-tinderbox
11+
stanford-crypto-aes
12+
stanford-crypto-ccm
13+
stanford-crypto-pbkdf2
14+
stanford-crypto-sha256-iterative

0 commit comments

Comments
 (0)