@rasamjs/core 0.1.0 → 0.1.1

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.
@@ -1,29 +1,29 @@
1
1
  # Rasam vs SVG.js
2
2
 
3
- SVG.js 3.2.8; Rasam 0.1.0 workspace. CPU: Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz.
3
+ SVG.js 3.2.8; Rasam 0.1.1 workspace. CPU: Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz.
4
4
 
5
5
  All timings below are medians in milliseconds. Ratios above 1 mean Rasam took longer.
6
6
 
7
7
  | Browser | Workload | Nodes | Samples | Rasam | SVG.js | Rasam / SVG.js |
8
8
  | --- | --- | ---: | ---: | ---: | ---: | ---: |
9
- | chromium 156.0.8078.4 | creation | 2000 | 15 | 9.50 | 12.90 | 0.74 |
10
- | chromium 156.0.8078.4 | creation | 8000 | 15 | 34.60 | 40.90 | 0.85 |
11
- | chromium 156.0.8078.4 | fill | 1000 | 100 | 0.48 | 1.29 | 0.37 |
12
- | chromium 156.0.8078.4 | repeated-fill | 1000 | 100 | 0.67 | 3.66 | 0.18 |
13
- | chromium 156.0.8078.4 | pointer-one | 8000 | 40 | 3.92 | 3.64 | 1.08 |
14
- | chromium 156.0.8078.4 | pointer-all | 8000 | 40 | 3.88 | 3.64 | 1.07 |
15
- | firefox 157.0 | creation | 2000 | 15 | 21.00 | 22.00 | 0.95 |
16
- | firefox 157.0 | creation | 8000 | 15 | 85.00 | 80.00 | 1.06 |
17
- | firefox 157.0 | fill | 1000 | 100 | 1.20 | 1.50 | 0.80 |
18
- | firefox 157.0 | repeated-fill | 1000 | 100 | 1.60 | 4.50 | 0.36 |
19
- | firefox 157.0 | pointer-one | 8000 | 40 | 4.40 | 3.40 | 1.29 |
20
- | firefox 157.0 | pointer-all | 8000 | 40 | 4.20 | 3.40 | 1.24 |
21
- | webkit 27.2 | creation | 2000 | 15 | 13.00 | 17.00 | 0.76 |
22
- | webkit 27.2 | creation | 8000 | 15 | 54.00 | 72.00 | 0.75 |
23
- | webkit 27.2 | fill | 1000 | 100 | 0.70 | 1.70 | 0.41 |
24
- | webkit 27.2 | repeated-fill | 1000 | 100 | 0.90 | 5.10 | 0.18 |
25
- | webkit 27.2 | pointer-one | 8000 | 40 | 4.40 | 3.40 | 1.29 |
26
- | webkit 27.2 | pointer-all | 8000 | 40 | 4.40 | 3.40 | 1.29 |
9
+ | chromium 156.0.8078.4 | creation | 2000 | 15 | 10.00 | 12.60 | 0.79 |
10
+ | chromium 156.0.8078.4 | creation | 8000 | 15 | 35.80 | 42.90 | 0.83 |
11
+ | chromium 156.0.8078.4 | fill | 1000 | 100 | 0.47 | 1.35 | 0.35 |
12
+ | chromium 156.0.8078.4 | repeated-fill | 1000 | 100 | 0.70 | 4.07 | 0.17 |
13
+ | chromium 156.0.8078.4 | pointer-one | 8000 | 40 | 3.88 | 3.72 | 1.04 |
14
+ | chromium 156.0.8078.4 | pointer-all | 8000 | 40 | 4.08 | 3.88 | 1.05 |
15
+ | firefox 157.0 | creation | 2000 | 15 | 23.00 | 23.00 | 1.00 |
16
+ | firefox 157.0 | creation | 8000 | 15 | 89.00 | 89.00 | 1.00 |
17
+ | firefox 157.0 | fill | 1000 | 100 | 1.30 | 1.80 | 0.72 |
18
+ | firefox 157.0 | repeated-fill | 1000 | 100 | 1.80 | 4.90 | 0.37 |
19
+ | firefox 157.0 | pointer-one | 8000 | 40 | 4.30 | 3.60 | 1.19 |
20
+ | firefox 157.0 | pointer-all | 8000 | 40 | 4.20 | 3.60 | 1.17 |
21
+ | webkit 27.2 | creation | 2000 | 15 | 15.00 | 19.00 | 0.79 |
22
+ | webkit 27.2 | creation | 8000 | 15 | 69.00 | 93.00 | 0.74 |
23
+ | webkit 27.2 | fill | 1000 | 100 | 0.70 | 1.80 | 0.39 |
24
+ | webkit 27.2 | repeated-fill | 1000 | 100 | 1.10 | 6.00 | 0.18 |
25
+ | webkit 27.2 | pointer-one | 8000 | 40 | 4.40 | 3.60 | 1.22 |
26
+ | webkit 27.2 | pointer-all | 8000 | 40 | 4.40 | 3.60 | 1.22 |
27
27
 
28
28
  ## Methodology
29
29
 
@@ -1,13 +1,10 @@
1
1
  {
2
- "generatedAt": "2026-10-29T21:17:05.310Z",
3
- "revision": "d5ed3d67f128f008403aaf0769dc4a546e7a5362",
2
+ "generatedAt": "2026-10-31T17:41:56.286Z",
3
+ "revision": "cb4e6c873e755c05afb78f84499cb2c84d48812d",
4
4
  "dirtyTree": [
5
5
  "M packages/rasam/reports/adoption.json",
6
6
  " M packages/rasam/reports/creation.json",
7
- " M packages/rasam/reports/interchange-benchmark.json",
8
- " M packages/rasam/reports/size-parity.json",
9
- " M packages/rasam/reports/size.json",
10
- "?? SELECTION_PLAN.md"
7
+ " M packages/rasam/reports/interchange-benchmark.json"
11
8
  ],
12
9
  "sourceFiles": [
13
10
  {
@@ -468,7 +465,7 @@
468
465
  },
469
466
  {
470
467
  "path": "src/mixins/sizable.ts",
471
- "sha256": "2625e4ccba1559b1ca3d27e80a9840248b50179b3956b622d4e40eb1185d0fc3"
468
+ "sha256": "82c6a26c4a52bb5f225a38151e0ba3ab059b1dab58918d23fa63338aec2f1f1c"
472
469
  },
473
470
  {
474
471
  "path": "src/mixins/sizing-internals.ts",
@@ -656,7 +653,7 @@
656
653
  },
657
654
  {
658
655
  "path": "../../package-lock.json",
659
- "sha256": "6e3b4ef2ec17899f72a491bacd75361e36ab1d51aac654390c6b679798ec564c"
656
+ "sha256": "3c5d776cfc023c5111ebd7c3b68f8bc0e461819d8b9afac5eafb72df32081fb9"
660
657
  }
661
658
  ],
662
659
  "svgjs": "3.2.8",
@@ -9613,7 +9610,7 @@
9613
9610
  "size": {
9614
9611
  "fixture": "fixtures/size.ts",
9615
9612
  "rawBytes": 65967,
9616
- "gzipBytes": 19757,
9613
+ "gzipBytes": 19758,
9617
9614
  "budgetBytes": 20480,
9618
9615
  "included": [
9619
9616
  "src/changes/mutation.ts",
@@ -9663,7 +9660,7 @@
9663
9660
  },
9664
9661
  "performance": {
9665
9662
  "fixture": "scripts/benchmark.mjs",
9666
- "date": "2026-10-29T21:16:59.895Z",
9663
+ "date": "2026-10-31T17:41:50.469Z",
9667
9664
  "browser": "Chromium 156.0.8078.4",
9668
9665
  "node": "v24.21.0",
9669
9666
  "os": "win32 10.0.26200",
@@ -9672,29 +9669,31 @@
9672
9669
  "count": 1000,
9673
9670
  "warmup": 20,
9674
9671
  "iterations": 100,
9675
- "medianMs": 0.5999999940395355,
9676
- "p95Ms": 1,
9672
+ "medianMs": 0.6000000238418579,
9673
+ "p95Ms": 0.9000000357627869,
9677
9674
  "targetMedianMs": 16,
9678
9675
  "includes": "logical mutations and synchronous DOM commit; excludes paint",
9679
9676
  "timings": [
9680
9677
  0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
9681
- 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
9682
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9683
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9684
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9685
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9686
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9687
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9688
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9689
- 0.5999999940395355, 0.5999999940395355, 0.5999999940395355, 0.5999999940395355,
9690
- 0.5999999940395355, 0.5999999940395355, 0.6000000238418579, 0.6000000238418579,
9678
+ 0.5, 0.5, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
9679
+ 0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
9680
+ 0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
9681
+ 0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
9682
+ 0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.6000000238418579,
9683
+ 0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
9684
+ 0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
9685
+ 0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
9686
+ 0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
9691
9687
  0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
9692
9688
  0.6000000238418579, 0.699999988079071, 0.699999988079071, 0.699999988079071,
9693
- 0.699999988079071, 0.699999988079071, 0.7000000178813934, 0.7000000178813934,
9694
- 0.7000000178813934, 0.7000000178813934, 0.7999999821186066, 0.7999999821186066,
9695
- 0.800000011920929, 0.800000011920929, 0.800000011920929, 0.9000000059604645,
9696
- 0.9000000059604645, 1, 1.0999999940395355, 1.100000023841858, 1.2000000178813934,
9697
- 1.399999976158142, 1.5
9689
+ 0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071,
9690
+ 0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071,
9691
+ 0.699999988079071, 0.699999988079071, 0.7000000476837158, 0.7000000476837158,
9692
+ 0.7000000476837158, 0.7000000476837158, 0.7999999523162842, 0.800000011920929,
9693
+ 0.800000011920929, 0.800000011920929, 0.800000011920929, 0.800000011920929, 0.800000011920929,
9694
+ 0.800000011920929, 0.800000011920929, 0.8999999761581421, 0.8999999761581421,
9695
+ 0.8999999761581421, 0.9000000357627869, 0.9000000357627869, 1, 1, 1.100000023841858,
9696
+ 1.199999988079071, 1.4000000357627869
9698
9697
  ]
9699
9698
  }
9700
9699
  }
@@ -27,18 +27,18 @@ export const Sizable: MixinSizable = (BaseClass) => {
27
27
 
28
28
  width(): Length | null;
29
29
  width(value: Length): this;
30
+ // Reads skip change tracking: a tracked read captures sibling order, which made
31
+ // measuring n fresh siblings O(n²) while change listeners were attached.
30
32
  width(value?: Length): Length | null | this {
31
- return mutation(this, () => {
32
- return value === undefined ? this.dimension('width') : this.resize('width', value);
33
- });
33
+ if (value === undefined) return this.dimension('width');
34
+ return mutation(this, () => this.resize('width', value));
34
35
  }
35
36
 
36
37
  height(): Length | null;
37
38
  height(value: Length): this;
38
39
  height(value?: Length): Length | null | this {
39
- return mutation(this, () => {
40
- return value === undefined ? this.dimension('height') : this.resize('height', value);
41
- });
40
+ if (value === undefined) return this.dimension('height');
41
+ return mutation(this, () => this.resize('height', value));
42
42
  }
43
43
 
44
44
  size(width: Length, height?: Length): this {