Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion methods/ejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ejs",
"scripts": {
"build": "mkdir -p dist && cp index.js dist/index.js && cp RecursiveDivs.ejs dist/RecursiveDivs.ejs",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"ejs": "^3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion methods/lithtml-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lithtml-ssr",
"scripts": {
"build": "babel index.js -d dist --extensions '.js'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/preact-htm-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "preact-htm-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx' --config-file ./babel-htm.config.js && babel dist/index.js -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/preact-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "preact-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/react-esx-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-esx-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/react-htm-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-htm-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx' --config-file ./babel-htm.config.js && babel dist/index.js -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/react-prepass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-prepass",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
4 changes: 2 additions & 2 deletions methods/react-ssr/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "react-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"build": "NODE_ENV=production bun build index.jsx --target bun --minify --outdir dist",
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/solid-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "solid-ssr",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/svelte-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "simple implementation of svelte-ssr",
"scripts": {
"build": "rollup -c",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"author": "Jacky Efendi",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion methods/vanilla-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vanilla-function",
"scripts": {
"build": "mkdir -p dist && cp index.js dist/index.js",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"dependencies": {
"node-stdev": "^1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion methods/vhtml-htm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vhtml-htm",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx' --config-file ./babel-htm.config.js && babel dist/index.js -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/vhtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vhtml",
"scripts": {
"build": "babel index.jsx -d dist --extensions '.js,.jsx'",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand Down
2 changes: 1 addition & 1 deletion methods/vue-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"build": "NODE_ENV=production webpack",
"bench": "NODE_ENV=production node dist/index.js"
"bench": "NODE_ENV=production bun dist/index.js"
},
"author": "Jacky Efendi",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"build:all": "pnpm --filter \"./methods/**\" build",
"bench:all": "node bench.js && node compile.js > result.md"
"bench:all": "bun bench.js && node compile.js > result.md"
},
"keywords": [
"ssr",
Expand Down
28 changes: 14 additions & 14 deletions result.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
┌─────────┬─────────────────────┬────────────────────┬───────┐
│ (index) │ name │ average │ stdev │
├─────────┼─────────────────────┼────────────────────┼───────┤
│ 0 │ 'vanilla-function' │ 2.8794111666666677 │ 0.74
│ 1 │ 'svelte-ssr' │ 10.261735033333336 │ 1.39
│ 2 │ 'react-ssr' │ 19.3648861333333322.87
│ 3 │ 'react-esx-ssr' │ 23.9652207333333322.13
│ 4 │ 'vhtml-htm' │ 25.9162898666666660.82
│ 5 │ 'vhtml' │ 28.9140948666666730.79
│ 6 │ 'preact-ssr' │ 35.77098513333333 │ 1.01
│ 7 │ 'lithtml-ssr' │ 38.41745029999999 │ 6.19
│ 8 │ 'react-ssr-prepass' │ 41.06950006666667 │ 0.86
│ 9 │ 'preact-htm-ssr' │ 54.735901866666665.12
│ 10 │ 'solid-ssr' │ 74.6545851 │ 4.71
│ 11 │ 'react-htm-ssr' │ 75.7835941999999810.41
│ 12 │ 'ejs' │ 166.3694963666666511.13
│ 13 │ 'vue-ssr' │ 345.6237718666667 │ 26.8
│ 0 │ 'vanilla-function' │ 3.137907033333333 │ 0.8
│ 1 │ 'svelte-ssr' │ 11.8275813 │ 1.75
│ 2 │ 'react-ssr' │ 15.664769100000003 2.2
│ 3 │ 'vhtml-htm' │ 22.9106644666666631.79
│ 4 │ 'lithtml-ssr' │ 25.8184562666666654.28
│ 5 │ 'vhtml' │ 26.5502348000000051.73
│ 6 │ 'react-esx-ssr' │ 28.445014733333334 │ 2.22
│ 7 │ 'solid-ssr' │ 30.391402599999996 │ 2.61
│ 8 │ 'react-ssr-prepass' │ 32.560452700000006 │ 2.1
│ 9 │ 'preact-ssr' │ 37.797504833333326.32
│ 10 │ 'preact-htm-ssr' │ 42.30982203333333 │ 3.12
│ 11 │ 'react-htm-ssr' │ 78.121721166666657.97
│ 12 │ 'ejs' │ 121.112084000000014.28
│ 13 │ 'vue-ssr' │ 134.87313196666668 │ 7.17
└─────────┴─────────────────────┴────────────────────┴───────┘
```