Skip to content

Instantly share code, notes, and snippets.

View pascaldekloe's full-sized avatar

Pascal S. de Kloe pascaldekloe

View GitHub Profile
@pascaldekloe
pascaldekloe / wordbench_test.go
Last active April 2, 2023 13:41
Go serialization speed test
// Package wordbench measures serialization speed.
package wordbench
import (
"encoding/binary"
"fmt"
"math/rand"
"testing"
)
@pascaldekloe
pascaldekloe / shasum.txt
Created August 27, 2023 19:06
Ethereum Freezer [Ancient] Checksums
f8df3a18a60eae038e30f99309b58aba1466eaf3 bodies.0000.cdat
3d9ed0e68ed89656b6758b9a6f53d70e49b9f668 bodies.0001.cdat
1157a083bb6f5105dbdf7ae30970e66ebec22a39 bodies.0002.cdat
fe4d5fcae14df2a8bea640fa14b00011f5686ba8 bodies.0003.cdat
23f69ee4c6c254ebcba3f8aacee990cfd3c13da5 bodies.0004.cdat
cf4986cd3e23b3e59b4b581304a24bcc01ca53f5 bodies.0005.cdat
2af4df7beac5741b93c9ac68f7542845e4c135f9 bodies.0006.cdat
480912845a44cb89230f5984edf1605965a195ba bodies.0007.cdat
be8665c0f3e88e9435be65024353818a16df97a2 bodies.0008.cdat
1f86b65b9d6f1ef4266ab00d57b3c66fb7d33dcc bodies.0009.cdat
@pascaldekloe
pascaldekloe / terminal-out.txt
Created August 30, 2023 12:43
CTRL + C ignored by iostat(1) on OSX
% iostat 1
disk0 disk4 cpu load average
KB/t tps MB/s KB/t tps MB/s us sy id 1m 5m 15m
20.46 33 0.67 34.86 201 6.84 3 2 96 1.60 1.36 1.27
4.00 46 0.18 65.06 234 14.85 2 1 97 1.60 1.36 1.27
4.00 35 0.14 56.85 215 11.93 8 3 89 1.56 1.35 1.27
4.00 16 0.06 37.93 190 7.04 2 1 97 1.56 1.35 1.27
4.34 82 0.35 28.71 230 6.44 2 2 96 1.56 1.35 1.27
4.42 86 0.37 33.94 248 8.23 3 3 94 1.56 1.35 1.27
4.00 25 0.10 75.17 191 14.02 2 1 96 1.56 1.35 1.27
@pascaldekloe
pascaldekloe / dec64.s
Created December 19, 2023 21:46
Experimental Integer Compression (Status Unknown)
.global _pack32dec64
.text
.align 2
// Decode64 reads X2 amount of bytes at address X1 and it writes the 32
// encoded-values to address X0. The first delta is applied against X3.
// X2 must be a multiple of 4, and no more than 32 × 8 (bytes).
_pack32dec64:
// TODO(pascaldekloe): validate X2
@pascaldekloe
pascaldekloe / main.go
Created February 7, 2025 17:18
CHOOSE_MULTIPLIER (for integer division)
// Tool to get the constant paramaters for “Division by Invariant Integers using
// Multiplication” <https://gmplib.org/~tege/divcnst-pldi94.pdf>.
package main
import (
"fmt"
"math/big"
"os"
"strconv"
)