flâneur — a map of the web's best reading

A tale of two CRDTs

home.seph.codes · saved by 1 readers

Last year I built the world's fastest collaborative text editing library. Automerge took 5 minutes to run a benchmark. Diamond types could run the same editing trace in 56 milliseconds (0.056 seconds). Thats 5000x faster. Replaying 260 000 editing operations in 56 milliseconds is pretty fast I guess. But I know what you're thinking - thats 56 milliseconds of your life you aren't getting back. Can we make it go even faster? We sure can. This year I've rewritten diamond types from the ground up to make it 14x faster than that. I can now run the same benchmark in 4.4 milliseconds. I can replay 260 000 edits - thats 11 pages of typing - in less than 1 frame. I'm proud of my work, but it comes with a cost. And part of me thinks this is a bad idea. I'm the part of Seph that thinks this is a bad idea. The new approach is only faster in ways that don't matter. But its slower wh- We'll get there. I'm conflicted. And I need help deciding which approach is better. What do you think? Diamond types

Last year I built the world's fastest collaborative text editing library. Automerge took 5 minutes to run a benchmark. Diamond types could run the same editing trace in 56 milliseconds (0.056 seconds). Thats 5000x faster. Replaying 260 000 editing operations in 56 milliseconds is pretty fast I guess. But I know what you're thinking - thats 56 milliseconds of your life you aren't getting back. Can we make it go even faster? We sure can. This year I've rewritten diamond types from the ground up to make it 14x faster than that. I can now run the same benchmark in 4.4 milliseconds. I can replay 26

Explore this link on the map →