-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65afdbb
commit 02bb17f
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>WebAssembly Test</title> | ||
</head> | ||
|
||
<body> | ||
<script> | ||
(async function () { | ||
const startTime = performance.now(); | ||
let instance; | ||
let imports = { | ||
env: { | ||
}, | ||
}; | ||
const indexResponse = await fetch("index.wasm"); | ||
const indexBinary = await indexResponse.arrayBuffer(); | ||
let wasm = await WebAssembly.instantiate(indexBinary, imports); | ||
instance = wasm.instance; | ||
instance.exports.figma_5307(9223372036854775808n, 9223372036854775807n); | ||
const endTime = performance.now(); | ||
const executionTime = endTime - startTime; | ||
const executionTimeElement = document.createElement('p'); | ||
executionTimeElement.textContent = `Execution time: ${executionTime} milliseconds`; | ||
document.body.appendChild(executionTimeElement); | ||
})(); | ||
</script> | ||
</body> | ||
|
||
</html> |
Binary file not shown.