Skip to content

Instantly share code, notes, and snippets.

View b3nab's full-sized avatar
👨‍💻
Focusing on big project

Ben Abbenanti b3nab

👨‍💻
Focusing on big project
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</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>
@b3nab
b3nab / index.html
Created October 21, 2021 15:31
compare of different reducer (http://jsbench.github.io/#222cd394e4afee6c3dc312efb661aa80) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>compare of different reducer</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>
@b3nab
b3nab / React-Hooks.js
Created October 12, 2021 19:13 — forked from craigtaub/React-Hooks.js
Nested React Hooks
// Engine
const React = {
index: 0,
state: [],
useEffect: (callback, dependencies) => {
const cachedIndex = React.index;
const hasChanged = dependencies !== React.state[cachedIndex];
if (dependencies === undefined || hasChanged) {
callback();