-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bind-get-set
- Loading branch information
Showing
87 changed files
with
764 additions
and
414 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 @@ | ||
output |
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
4 changes: 2 additions & 2 deletions
4
...rking/benchmarks/kairo/kairo_avoidable.js → ...marks/reactivity/kairo/kairo_avoidable.js
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
4 changes: 2 additions & 2 deletions
4
benchmarking/benchmarks/kairo/kairo_broad.js → ...enchmarks/reactivity/kairo/kairo_broad.js
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
4 changes: 2 additions & 2 deletions
4
benchmarking/benchmarks/kairo/kairo_deep.js → ...benchmarks/reactivity/kairo/kairo_deep.js
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
4 changes: 2 additions & 2 deletions
4
...marking/benchmarks/kairo/kairo_diamond.js → ...chmarks/reactivity/kairo/kairo_diamond.js
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
4 changes: 2 additions & 2 deletions
4
benchmarking/benchmarks/kairo/kairo_mux.js → .../benchmarks/reactivity/kairo/kairo_mux.js
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
4 changes: 2 additions & 2 deletions
4
...arking/benchmarks/kairo/kairo_repeated.js → ...hmarks/reactivity/kairo/kairo_repeated.js
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
4 changes: 2 additions & 2 deletions
4
...arking/benchmarks/kairo/kairo_triangle.js → ...hmarks/reactivity/kairo/kairo_triangle.js
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
4 changes: 2 additions & 2 deletions
4
...arking/benchmarks/kairo/kairo_unstable.js → ...hmarks/reactivity/kairo/kairo_unstable.js
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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
benchmarking/benchmarks/mol_bench.js → ...arking/benchmarks/reactivity/mol_bench.js
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
4 changes: 2 additions & 2 deletions
4
benchmarking/benchmarks/sbench.js → benchmarking/benchmarks/reactivity/sbench.js
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
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,3 @@ | ||
import { wrapper_bench } from './wrapper/wrapper_bench.js'; | ||
|
||
export const ssr_benchmarks = [wrapper_bench]; |
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,31 @@ | ||
<script> | ||
const wrapperWidth = 960; | ||
const wrapperHeight = 720; | ||
const cellSize = 10; | ||
const centerX = wrapperWidth / 2; | ||
const centerY = wrapperHeight / 2; | ||
let angle = 0; | ||
let radius = 0; | ||
let tiles = []; | ||
const step = cellSize; | ||
while (radius < Math.min(wrapperWidth, wrapperHeight) / 2) { | ||
let x = centerX + Math.cos(angle) * radius; | ||
let y = centerY + Math.sin(angle) * radius; | ||
if (x >= 0 && x <= wrapperWidth - cellSize && y >= 0 && y <= wrapperHeight - cellSize) { | ||
tiles.push({ x, y }); | ||
} | ||
angle += 0.2; | ||
radius += step * 0.015; | ||
} | ||
</script> | ||
|
||
<div id="wrapper"> | ||
{#each tiles as { x, y }} | ||
<div class="tile" style="left: {x.toFixed(2)}px; top: {y.toFixed(2)}px;"></div> | ||
{/each} | ||
</div> |
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,36 @@ | ||
import { render } from 'svelte/server'; | ||
import { fastest_test, read_file, write } from '../../../utils.js'; | ||
import { compile } from 'svelte/compiler'; | ||
|
||
const dir = `${process.cwd()}/benchmarking/benchmarks/ssr/wrapper`; | ||
|
||
async function compile_svelte() { | ||
const output = compile(read_file(`${dir}/App.svelte`), { | ||
generate: 'server' | ||
}); | ||
write(`${dir}/output/App.js`, output.js.code); | ||
|
||
const module = await import(`${dir}/output/App.js`); | ||
|
||
return module.default; | ||
} | ||
|
||
export async function wrapper_bench() { | ||
const App = await compile_svelte(); | ||
// Do 3 loops to warm up JIT | ||
for (let i = 0; i < 3; i++) { | ||
render(App); | ||
} | ||
|
||
const { timing } = await fastest_test(10, () => { | ||
for (let i = 0; i < 100; i++) { | ||
render(App); | ||
} | ||
}); | ||
|
||
return { | ||
benchmark: 'wrapper_bench', | ||
time: timing.time.toFixed(2), | ||
gc_time: timing.gc_time.toFixed(2) | ||
}; | ||
} |
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
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
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
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
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
Oops, something went wrong.