Michael Arntzenius irl. PL design, math, calligraphy, &c.
@rntz@recurse.social
Jun 25, 2023 • 7 tweets • 2 min read
on the left is an "optimized" prime sieve
on the right, the dumbest possible factorization algorithm, literally "loop through all possible factors up to sqrt(n) and divide"
guess who wins?
that's right:
the dumb one,
by THREE ORDERS OF MAGNITUDE, what the hell
to factor the number 12345678987654321, it takes
my original sieve: 50s
my optimized sieve: 10s
the obvious dumb thing: 0.07s (!!!)
I'm still not sure whether I was dumb for even thinking a sieve of Eratosthenes would be useful here.
Jul 20, 2018 • 4 tweets • 1 min read
The GC is my shepherd; I shall not want.
She maketh me to lie down in free pages;
She leadeth me beside the tagged pointers.
She restoreth my memory;
She leadeth me in the paths of finalization for her name's sake.
Yea, though I walk through the valley of the shadow of malloc(),
I will fear no memory leaks; for thou art with me;
Thy mark and thy sweep they comfort me.