Skip to content

Instantly share code, notes, and snippets.

View DanielFGray's full-sized avatar

Daniel Gray DanielFGray

View GitHub Profile
begin;
-- user accounts
create extension if not exists citext;
create table users (
user_id int primary key generated always as identity,
username citext unique not null,
created_at timestamptz not null default now()
);
@DanielFGray
DanielFGray / index.html
Last active October 6, 2023 20:14
object lookup vs map lookup (http://jsbench.github.io/#12b6afb8665e3887c8e1c7dde244fd41) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>object lookup vs map lookup</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>
@DanielFGray
DanielFGray / index.html
Created November 13, 2023 21:04
Map to values array, array spread vs array.from (http://jsbench.github.io/#0717707c579f990df95d04e8b276eae6) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Map to values array, array spread vs array.from </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>