Skip to content

Instantly share code, notes, and snippets.

View warpech's full-sized avatar
🤹‍♂️
Code sweet code

Marcin Warpechowski warpech

🤹‍♂️
Code sweet code
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Math.max vs condition</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active November 6, 2019 09:18
Array read #jsbench #jsperf (http://jsbench.github.io/#b5e7fcb3513d4c3e8971335148cb5b65) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Array read #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active November 6, 2019 09:18
Array write #jsbench #jsperf (http://jsbench.github.io/#135b9097d64c61f6277d55cc80bd5775) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Array write #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active October 25, 2019 12:37
Ways of wrapping a function #jsbench #jsperf (http://jsbench.github.io/#f801fb778dbac7124d43ed7eb60e5a29) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Ways of wrapping a function #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>String vs array</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active September 4, 2019 12:19
Lookup tables - Iteration #jsbench #jsperf #jsbench #jsperf (http://jsbench.github.io/#d50d52a103bc9947c6018beef362d4fe) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Lookup tables - Iteration #jsbench #jsperf #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active November 30, 2020 13:15
Lookup tables - Iterator generation and iteration #jsbench #jsperf #jsbench #jsperf (http://jsbench.github.io/#2b685a20300cb1d78785b727782559af) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Lookup tables - Iterator generation and iteration #jsbench #jsperf #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Created September 2, 2019 21:46
Preallocate array vs push (http://jsbench.github.io/#72d6109960e72f4d2bb3145f2d097476) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Preallocate array vs push</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Created September 2, 2019 13:16
Two arrays vs one array + type checking (http://jsbench.github.io/#67a3a2de9fc39278ee04812857b7338b) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Two arrays vs one array + type checking</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Created August 29, 2019 11:33
DOM new children loop vs element callback (http://jsbench.github.io/#004ef453589e9cae14246ad5bd416e1a) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>DOM new children loop vs element callback</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>