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
@warpech
warpech / index.html
Created August 29, 2019 11:22
cloneNode vs createElement #jsbench #jsperf (http://jsbench.github.io/#b5ff4639e5e3f2aa64006027f9c7961e) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>cloneNode vs createElement #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 September 4, 2019 11:57
Lookup tables - Set and Get #jsbench #jsperf (http://jsbench.github.io/#be4048ef39e18364ddce561546eb64b7) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Lookup tables - Set and Get #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 August 21, 2019 14:47
Reflecting changes to a setter #jsbench #jsperf (http://jsbench.github.io/#974afc7ca9d3c7f6c79311a2221cf0ad) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Reflecting changes to a setter #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>Array unshift 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
Last active July 31, 2019 13:37
getBoundingClientRect vs offsetWidth/offsetHeight (http://jsbench.github.io/#8269752a98dee94f58319328a14bf8a7) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>getBoundingClientRect vs offsetWidth/offsetHeight</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 July 30, 2019 09:45
Single vs multiple JSON serialization (http://jsbench.github.io/#2cd4ee42cc5997ddd05b7f348ab218d0) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Single vs multiple JSON serialization</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 July 29, 2019 15:18
Deep freeze copy vs JSON.parse/stringify (http://jsbench.github.io/#45dbae3ed7f738d1de8e841b0f5aa43f) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Deep freeze copy vs JSON.parse/stringify</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 July 25, 2019 12:00
Ways to iterate an array with offset (http://jsbench.github.io/#cfa53da3e4611491b17338b7544435b6) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Ways to iterate an array with offset</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>2D vs 1D arrays</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 11:16
Array of objects vs multiple arrays #jsbench #jsperf (http://jsbench.github.io/#fb2e17228039ba5bfdf4d1744395f352) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Array of objects vs multiple arrays #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>