Skip to content

Instantly share code, notes, and snippets.

@milahu
milahu / brave-browser-is-spyware.md
Created March 22, 2022 07:16
brave browser is spyware? yes.
@milahu
milahu / index.html
Last active December 18, 2020 15:24
unswitch for loop #jsbench #jsperf (https://jsbench.github.io/#ad362c5589fab6e17498939f5343310d) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>unswitch for loop #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>
@milahu
milahu / index.html
Created December 17, 2020 18:08
native sort vs JS sort (https://jsbench.github.io/#c90f8f13202ce5498f811ff79fb281ed) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>native sort vs JS sort</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>
@milahu
milahu / index.html
Last active June 2, 2021 20:28
get last item / key / value in map #jsbench #jsperf (https://jsbench.github.io/#7992a793df12b1ee16beaef7a9863c68) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>get last item / key / value in map #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>
@milahu
milahu / index.html
Last active October 10, 2020 08:23
binary search vs biased binary search (optimized for sequential search) #jsbench #jsperf (http://jsbench.github.io/#24ecbbbc5d760eb771f776b227d8c36b) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>binary search vs biased binary search (optimized for sequential search) #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>
@milahu
milahu / index.html
Last active April 6, 2021 06:26 — forked from jridgewell/index.html
trace sourcemap: binary search vs cache array / object / map / flat map (https://jsbench.github.io/#cf2b815df12f6fc912afd58aba934d84) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>trace sourcemap: binary search vs cache array / object / map / flat map</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>unswitch for loop</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>
@milahu
milahu / index.html
Last active October 5, 2020 16:30
test if array index exists by value or array length #jsbench #jsperf (http://jsbench.github.io/#8d011d47ee4a1cfda2e94b07ca28d351) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>test if array index exists by value or array length #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>
@milahu
milahu / index.html
Last active October 5, 2020 15:58
performance of different loop types #jsbench #jsperf (http://jsbench.github.io/#6f65c587af9277325bcda0e69ba44d5f) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>performance of different loop types #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>
@milahu
milahu / index.html
Last active January 5, 2021 00:17
count number of lines in string (http://jsbench.github.io/#4cc806b4507ae063efc81900cdfb9b02) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>count number of lines in string</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>