Skip to content

Commit a7f8de6

Browse files
committed
minor cleanups, update paths
1 parent 4137356 commit a7f8de6

10 files changed

+18
-18
lines changed

JetStreamDriver.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,17 +2103,17 @@ let BENCHMARKS = [
21032103
"./Kotlin-compose/benchmark.js",
21042104
],
21052105
preload: {
2106-
wasmBinary: "./Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.wasm",
2106+
wasmBinary: "./Kotlin-compose/build/compose-benchmarks-benchmarks.wasm",
21072107
wasmSkikoBinary: "./Kotlin-compose/build/skiko.wasm",
21082108
inputImageCompose: "./Kotlin-compose/build/compose-multiplatform.png",
21092109
inputImageCat: "./Kotlin-compose/build/example1_cat.jpg",
21102110
inputImageComposeCommunity: "./Kotlin-compose/build/example1_compose-community-primary.png",
21112111
inputFontItalic: "./Kotlin-compose/build/jetbrainsmono_italic.ttf",
21122112
inputFontRegular: "./Kotlin-compose/build/jetbrainsmono_regular.ttf"
21132113
},
2114-
iterations: 10,
2114+
iterations: 15,
21152115
worstCaseCount: 2,
2116-
testGroup: WasmGroup,
2116+
tags: ["Wasm"],
21172117
}),
21182118
new WasmLegacyBenchmark({
21192119
name: "tfjs-wasm",

Kotlin-compose/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/cfw_d8_bench_bin/
21
/compose-multiplatform/

Kotlin-compose/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ See `build.log` for the last build time, used sources, and toolchain versions.
1515
## Running in JS shells
1616

1717
To run the unmodified upstream benchmark, without the JetStream driver, see the
18-
upstream repo.
18+
upstream repo, specifically https://github.com/JetBrains/compose-multiplatform/blob/master/benchmarks/multiplatform/README.md

Kotlin-compose/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ globalThis.skipFunMain = true;
101101

102102
// Prevent this from being detected as a shell environment, so that we use the
103103
// same code paths as in the browser.
104-
// See `compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs`.
104+
// See `compose-benchmarks-benchmarks.uninstantiated.mjs`.
105105
delete globalThis.d8;
106106
delete globalThis.inIon;
107107
delete globalThis.jscOptions;
@@ -145,7 +145,7 @@ class Benchmark {
145145

146146
preload = {
147147
'skiko.wasm': Module.wasmSkikoBinary,
148-
'./compose-benchmarks-benchmarks-wasm-js.wasm': Module.wasmBinary,
148+
'./compose-benchmarks-benchmarks.wasm': Module.wasmBinary,
149149
'./composeResources/compose_benchmarks.benchmarks.generated.resources/drawable/compose-multiplatform.png': Module.inputImageCompose,
150150
'./composeResources/compose_benchmarks.benchmarks.generated.resources/drawable/example1_cat.jpg': Module.inputImageCat,
151151
'./composeResources/compose_benchmarks.benchmarks.generated.resources/files/example1_compose-community-primary.png': Module.inputImageComposeCommunity,
@@ -154,10 +154,10 @@ class Benchmark {
154154
};
155155

156156
// We patched `skiko.mjs` to not immediately instantiate the `skiko.wasm`
157-
// module, so that we can move the dynamic JS import here and measure
157+
// module, so that we can move the dynamic JS import here but measure
158158
// WebAssembly compilation and instantiation as part of the first iteration.
159159
this.skikoInstantiate = (await dynamicJSImport('Kotlin-compose/build/skiko.mjs')).default;
160-
this.mainInstantiate = (await dynamicJSImport('Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs')).instantiate;
160+
this.mainInstantiate = (await dynamicJSImport('Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs')).instantiate;
161161
}
162162

163163
async runIteration() {

Kotlin-compose/build.log

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Built on 2025-07-08 12:20:38+02:00
1+
Built on 2025-07-08 12:47:21+02:00
2+
Cloning into 'compose-multiplatform'...
23
754dc25396 Update CHANGELOG for 1.9.0-alpha03 release (#5349)
34
Copying generated files into build/
45
Build success

Kotlin-compose/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ pushd benchmarks/multiplatform
1616
./gradlew :benchmarks:wasmJsProductionExecutableCompileSync
1717
# For building polyfills and JavaScript launcher to run in d8 (which inspires the benchmark.js launcher here):
1818
# ./gradlew :benchmarks:buildD8Distribution
19-
BUILD_SRC_DIR="compose-multiplatform/benchmarks/multiplatform/build/js/packages/compose-benchmarks-benchmarks-wasm-js/kotlin"
19+
BUILD_SRC_DIR="compose-multiplatform/benchmarks/multiplatform/build/wasm/packages/compose-benchmarks-benchmarks/kotlin"
2020
popd
2121
popd
2222

2323
echo "Copying generated files into build/" | tee -a "$BUILD_LOG"
24-
mkdir -p build/drawable/ | tee -a "$BUILD_LOG"
25-
cp $BUILD_SRC_DIR/compose-benchmarks-benchmarks-wasm-js.{wasm,uninstantiated.mjs} build/ | tee -a "$BUILD_LOG"
24+
mkdir -p build/ | tee -a "$BUILD_LOG"
25+
cp $BUILD_SRC_DIR/compose-benchmarks-benchmarks.{wasm,uninstantiated.mjs} build/ | tee -a "$BUILD_LOG"
2626
git apply hook-print.patch | tee -a "$BUILD_LOG"
2727
cp $BUILD_SRC_DIR/skiko.{wasm,mjs} build/ | tee -a "$BUILD_LOG"
2828
git apply skiko-disable-instantiate.patch | tee -a "$BUILD_LOG"
-5.09 MB
Binary file not shown.

Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs renamed to Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export async function instantiate(imports={}, runInitializer=true) {
377377
throw "Supported JS engine not detected";
378378
}
379379

380-
const wasmFilePath = './compose-benchmarks-benchmarks-wasm-js.wasm';
380+
const wasmFilePath = './compose-benchmarks-benchmarks.wasm';
381381
const importObject = {
382382
js_code,
383383
intrinsics: {
@@ -414,7 +414,7 @@ export async function instantiate(imports={}, runInitializer=true) {
414414
}
415415

416416
if (isBrowser) {
417-
wasmInstance = (await WebAssembly.instantiateStreaming(fetch(new URL('./compose-benchmarks-benchmarks-wasm-js.wasm',import.meta.url).href), importObject)).instance;
417+
wasmInstance = (await WebAssembly.instantiateStreaming(fetch(new URL('./compose-benchmarks-benchmarks.wasm',import.meta.url).href), importObject)).instance;
418418
}
419419
} catch (e) {
420420
if (e instanceof WebAssembly.CompileError) {
4.91 MB
Binary file not shown.

Kotlin-compose/hook-print.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs b/Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs
1+
diff --git a/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs b/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
22
index f92d6ec..54cc4cf 100644
3-
--- a/Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs
4-
+++ b/Kotlin-compose/build/compose-benchmarks-benchmarks-wasm-js.uninstantiated.mjs
3+
--- a/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
4+
+++ b/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
55
@@ -111,8 +111,8 @@ export async function instantiate(imports={}, runInitializer=true) {
66
},
77
'kotlin.js.__convertKotlinClosureToJsClosure_(()->Unit)' : (f) => getCachedJsObject(f, () => wasmExports['__callFunction_(()->Unit)'](f, )),

0 commit comments

Comments
 (0)