@mirascript/mirascript 0.1.29 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bench/index.ts +3 -3
- package/package.json +3 -3
package/bench/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Bench } from 'tinybench';
|
|
2
2
|
import { compile, compileSync, createVmContext } from '@mirascript/mirascript';
|
|
3
3
|
|
|
4
|
-
const bench = new Bench({ name: 'simple benchmark', time:
|
|
5
|
-
const source = `sin(x) + cos(y + PI / 2)
|
|
4
|
+
const bench = new Bench({ name: 'simple benchmark', time: 100 });
|
|
5
|
+
const source = `sin(x) + cos(y + PI / 2) + `.repeat(1) + '0';
|
|
6
6
|
const env = { x: 1, y: 2 };
|
|
7
7
|
|
|
8
8
|
bench
|
|
9
9
|
.add('compile', async () => {
|
|
10
|
-
await compile(source);
|
|
10
|
+
await Promise.all(Array.from({ length: 10 }).map(async () => compile(source)));
|
|
11
11
|
})
|
|
12
12
|
.add('compileSync', () => {
|
|
13
13
|
compileSync(source);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/mirascript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An expression based scripting language.",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"commander": "^14.0.2",
|
|
37
37
|
"source-map-js": "^1.2.1",
|
|
38
38
|
"supports-color": "^10.2.2",
|
|
39
|
-
"@mirascript/
|
|
40
|
-
"@mirascript/
|
|
39
|
+
"@mirascript/bindings": "~0.1.30",
|
|
40
|
+
"@mirascript/constants": "~0.1.30"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^25.0.3",
|