''''' 'y'd'i't' 'e'm''''''''''''''5000x faster CRDTs: An adventure in optimization''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'g' 's''a' 'e'''''''''''''''''''''''n'o'i't'a'z'i'm'i't'p'o' 'n'i' 'd'a'm' 'I' 'w'o'H'''''''' 'g'n'''o'g' ''''i'k'a'M'n'''''''50'''''''''''''e'r'u't'n'e'v'd'a' '''' '''''''''''''''''''r'e't's'a'f' 'x'''' '0'0'0'5' 'o'g' 't'a'h't' '00x faste' 'r''''''''''''''''''''''''''''''''n'o'i't'a'z'i'm'i't'p'o' 'n'i' 'y'd'u't's' 'e's'a'c' 'A' ':''''''':''''''''''''''''='c'r's' 'g'm'i'<'''''>'''> aut'''''x'0'0'0'5'omerge1.drawio.svg'n'n'.'N'H''''N' 'r'o'f' 'y'd'a'e'r' 't'''n's'i' 's'i'h'T' '!'e's'''''''i'l'l'i''''' -->'''s'm'''''''''''''M''''m''''''''''''t'n'e'd'u't's' 'd'a'r'g''''-'''s'M'''''''s'm''''''s'm'-''''''''''''0'0'0'1'='s'M''''M'e'm'i't' 'n'''''t'b'-'e'm'i'''''''''n't'b'-'e'm'i't't'- '''''''''''''''''''''''n'f'd's'''d'f's'd'''''''i'a'h' 'h'o' -->'''''' /'''''''''''''''>'o'o'f'-'h'p'e's'/'<'''''''>'/' 'o'o'f'-'h'p'e's'<''n'n'a'e'l'p' ''''p'y'l'e'd'i'w' 'o'o't' '''''''''''''''''''''''''''''''' 'f'f'u't's'''e'w' 's'i'h't' 't'u'o'b'a' 'g'n'i'k'l'a't' 'n'e'v'E''''''For the uninitiated, CRD's'''TS [(Conflict-Free Replicated Data types)](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) are fancy programming tools which let multiple users edit the same data at the same time. They let you work locally with no lag. (You don't even have to be online). And when you do sync up with other users & devices, everything just magically syncs up and becomes eventually consistent. The bes'''''''''''''c'i'm'e'd'a'c'a' 'e'm'o's'''''''''''s''''e'd''''''h'c'a'e't'o'c''''y'd'o'b'e'm'o's't part of CRDTs is that they can do all that without even needing a centralized computer in the cloud to monitor and control everything''''''''t'n'a'w' 'I''Think, Google Do'''''''''y'm' 't'n'a'w' 'I''''''y''''''''''''''''''''''''''''''''''''''''''''''''''''s'e'c'i'v''''''[''''''''''o't'''https://ourincrediblejourney.tumblr.com')'/'(']'' '''''g'''n'i'd'e'e'n'''''''''''I' 'o'g'a' 's'r'a'e'Y'' 'e'm' ''e'd' 'y'm''''''r'o'F' 'l'l'''''''''''''''''''''''''''''''''''''''''''''y'k'n'u'l'c' 'd'n'a' '''' ''')'a't'a'd' ''''''''''''''''''' '.'w'o'n' 'l'i't'n'u' ','l'l'e'W''n'o'i't'a'c'i'l'p'p'a' 'l'a''''l'e'r' 'r'e'h't'o' 'd'n'a'(' ''a' 'n'''''''n'e'e'b' 'e'v''''''e'''''''''''s'r'a'e'y'''''''''''''e'd' 'a' 'r'o'f' 'e'w't'e'b' 'a't'a'd' 'e'r'a'h''a's'''''' 'k'r'o'w' 'y'l's's'e'l'm'a'e's' 'o't' 's'p'p'a''m' 'cs without google. Or master-master database replication without lag. Or seamles''''''''''''''''''''''''''s''''''''t'''''''''''''''e'm'o's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'''''f''' 't'u'B'''''''''''''''''''''''''e'r'''y'e'h't' 'g'n'i't'i'd'e' 't'x'e't' 'r'o'F''e'h't'o''''''''''''''''''''''''''''' 'y'''''For the uninitiated, CRDTs [(Conflict-Free Replicated Data typ' '''es)](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) are fancy programming tools which let multiple users edit the same data at the same time. They let you work locally with no lag. (You don't even have to be online). And when you do sync up with other users & devices, everything just magically syncs up and becomes eventually consistent. The best part of CRDTs'I want Google Docs without google. I want my apps to seamlessly share data between all my devices, without me needing to rely on some [flakey startup](https://ourincrediblejourney.tumblr.com/)'s servers to still be around in another decade. I think they're the [future of collaborative editing](https://josephg.com/blog/crdts-are-the-future/). And maybe the future of all software - but I'm not ready to talk about that yet.''I want Google Docs without google. I want my apps to seamlessly share data between all my devices, without me needing to rely on some [flakey startup](https://ourincrediblejourney.tumblr.com/)'s servers to still be around in another decade.' is that they can do all that without even needing a centralized computer in the cloud to monitor and control everything.''n''nI want Google Docs without google. I want my apps to seamle'nFor the uninitiated, CRDTs [(Conflict-Free Replicated Data types)](https://en.wikipedia.org/wiki/Conflict-free_repli''c''a''ted_data_type) are fancy programming tools which let multiple users edit the same data at the same time. They let you'''''''' ''w''ork locally with no lag. (You don't even have to be online). And when you do sync up with other users & devices, everything just magically syncs up and becomes eventuall''''''n''n'''''''m''' 't'u'B'n'n'''y consistent. The best part of CRDTs is '''A''' '.'that they can do all that without even needing a centralized computer in the cloud to monitor and control everything.'ssl'n'y share data between all my devices, without me needing to rely on some [flakey startup](https://ourincrediblejourney.tumblr.com/)'s ser'n'vers to still be around in another decade.''n''nFor text editing they've been famously really slow and clun'nI want Google Docs without google. I want my apps to seamlessly share data between all my dev'''n'n'n'ices, without me needing to rely on some [flakey startup](https://ourincrediblejourney.tumblr.com/)'s servers to still be around in another decade.'ky 'n'for years, so barely anyone uses them. Well, until now.'''''n'''n'n'n''''''''''''''''''''''''''''''m'''''''''''''''''''''nFor text editing they've been famously really slow and clunky for years, so barely anyone uses them. Well, until now.'''''n'''''n'''''n''''n'n'n''''But before we can even talk about that'',''''''''''''''''''''''''''''''''''''''''' ','t'a'h't' 't'u'o'b'a' 'k'l'a't' 'n'e'v'e' 'n'a'c' 'e'w' 'e'r'o'f'e'b' 't'u'B'n'n'!'e'b' 'o't' 'e'v'a'h' 't'''n'o'd' 'y'e'h't' 't'u'B''''''' ','l'l'e'W' '''''''''''''l'e'W' ''e'h't' 's'''' 'e's'u' 'e'n'o'y'n'a' 'y'l'e'r''''''''''e'r''''l's'a'b''''''''''''''y'l'l'a'e'r' 'y'd'o'b'o'n' 'o's' ','l'l'a'e'r''''''.'w'o'l's' 'y'l's'u'o'm'a'f' 'e'r'''y'e'h't' 't'u'B'n''n''n'''''''''.'e'd'a'c'e'd' 'a' 'n'i' 'd'n'u'o'r'a' 'e'b' 'l'l'i't's' 'o't' 's'r'e'v'r'e'''''''a't's' 's'''''' 'p'u't'r'a't's' 'y'e'k'a'l'f' 'a' 'n'o' 'g'n'i'y'l'e'r'''''''''''''''''''''e'm'o's' 't'a'h't' '''''''''''''''''''''''''''''''''''''''.'s'r'a'e'y' 'e'l'p'u'o'c' 'a' 'n'i' 'k'r'a'd''''''''e'n'i'l'f'f'o' 'o'g' 'o't' 'g'n'i'o'g' 'e'r'a''g'n'i'y'r'r'o'w''''u'o'''''''''''''''''' 'y'g'd''''''''''' 's'r'e'v'r'e's' 's''''o'd''''''''p'u't'r'a't's' 'o'n' 'h't'i'w' ','a't'a'd' 'n'o'i't'a'c'i'l'p'p'a' 'e'c'i'v'e'd'-'s's'o'r'c' 's'n'n'''. Think, Google Docs without google. Or master-master database replication withou'''''''''''''''''' 's's'e'l'm'a'e's' 'r'O' '.'g'a'l' 't'''''''''''''''''''''''''''' '(''S'T'D'R'C''' ','d'e't'a'i't'i'n'')'''''''n't'i'n'u' 'e'h't' 'r'o'F''CRDTs are'[' Conflict-Free Repli''''e'r'a' 'cated Data ty'''''''''''''''t'e'l' 'h'c'i'''h'w'''''''''''w'o'l'l'a' 'o'''o't' ''''''''''''''''''''''''''''''''''''''.''Y''''''''''''''''''''''''''''''''''''''''''''''''''sync''''''''t'c''with'''o't'e'n'n'o'c'''''''''''''''''''''''''''&''''''''''''''''''''''''''''''''''''''''' 'd'l''''''''''''''''''''''''''''''''''''''''''''.'t'n'e't's'i's'n'o'c' 'y'l'l'a'u't'''''n'a'c' 'n'e'v'e' 's'e'm'o'c''''''n'e'v'e'''a' ' 'e''''''''''''G''''''D''''''''''''g''''G''''''''''''''''''''''''''' 'e's'a'b'a't'a'd''''''''''''''''''''' 't'u'o'h't'i'w' 'n'o'i't'a'c'i'l'p'e'r' 'r'e't's'a'm'-'r'e't's'a'm' 'r'O' '''''''''''''''''''''.'e'l'''''''e'.'g'o'o'g' 't'u'o'h't'i'w' 's'c'o'd' 'e'l'g'o'o'g' ','k'n'i'h'T' '''d'e'z'i'b' 'd'n'a' 'p'''u' 's'''c'n'y's' ''u'o'h''''''''''''' ','m'e'h'A'''''''G'''''''''s'c'o'D' '''''''' ')'e'l'g'o'o'g' 'e'k'i'L'(' 's'''''''''''''''y'l'l'a'c'i'g''''i'a'm' 't's'u'j'''' 's'i' 'g'n'i'h't'y'r'e'v'e' ','s'e'c'i'v'e'd' '/' 's'r'e's'u' 'r'e'h't'o' 'h't'i'w' 'p'u' 'c'n'y's' 'o'd' 'u'o'y' 'n'e'h'w' 'd'n'A' '')'e'n'i'l'n'o' 'e'b' 'o't' 'e'v'a'h' 'n'e'v'e' 't'''n'o'd' 'u'o'y'(' 'g'a'l' 'o'n' '''''''''''''''''''''''t'e'n'r'e't'n'i' 'e'h't' 't'u'o'h't'i'w' 'y'l'l'a'c'o'l' 'k'r'o'w' 'u'o'y' 't'e'l' 'y'e'h'T'''''t''''''''''' 'k'r'o'''w''''''''t'i' ''''''''''''o't' '''g'''''n'i'd'e'e'n' 'o'd' '''''''''''r'o' 'g'n'i'k'c'o'l' ''y'e'h't' '''''''''''''''''''''''''''t'a'h't' 'e'k'i'l' 'g'n'i'h''''''''''''y'e'h't' 't'a'h't' ''t'y'n'a' 'r'o'''''''n'a' '''''''''''''''t'i' 'o'd''''''''''''''''' 't'u'o'''''''''' ',''b'a' '''''''''''''m'o'r'f''''' '&' 'g'a'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'''i'''' 'n'''o' 'r'e't'u'p'''''''l'o'r't'n'o'c''m'o'c' 'l'a'r't'n'e'c' 'y'n'a''S''''''''E''''''C'''''''''g'n'i'd'e'e'n' 't'u'o'h't'i'w' 't'a'h't'''''''''''''''d'n'a' 'r'o't'i'n'o'm' ' 'l'l'a' 'o'd' 'n'a'c' 'u'o'y' 's'i' 's'''' 'T'D'R'C' 'f'o' 't'r'a'p' 't's'e'b' 'e'h'T''''''''''''''''''''''''s'n'o'i't'c'e'n'n'o'c' 't'e'n'r'e't'n'i' 'y't't'o'p's' 'r'o' '''''''''''''''''''''''''''''''''''''''''''' 'o't' 'e'n'i'l'n'o' 'e'b' 'o't' 'd'e'e'n' 'n'e'v'e' 't'''n'o'd' 'e'l'p'o'e'P' '.'''''''''''''''''''e''''b' 'r'o' ','g'n'i'y'r'r'o'w'' 'n'a'c' 'e'w' 'd'n'A' '.'''''(https://en.wikipedia.org/wiki/Conflict-free_replicated_data_typ''''''h'T'e''')')'(']'''''''''''''''''''''''''''''''s'l'o'o't'''''''s'k'c'i'r't' 'g'n'i'''m'm'''a'r'g'o'r'p' 'y'c'n'a'f' 'e'r'''y''''''''''''''''''''''''s'r'e'v'r'e's''''''''''''''''y'l'l'u'f''''''''''''''''''''''''''''''''''''''''''''''''''o''''''''''e't'a'n'i'd'r'o'o'c''t' 'g'n'i'd'e'e'n'''''''''''''''' 'd'n'a' 'g'n'i's's'e'n't'i'w''''''''''''g'n'i'l'l'o'r't'n'o'c' ''')'''''')'d'u'o'l'c' 'e'h't'''(' 'r'e't''''e'u'p'm'o'c' 's'''e's'l'e' 'y'd'o'b'e'm'o's'''e'p'''''''G'N'A'A'F' 'o'h''''''''''''''''''''' 'e'm'''''''''''e'g'r'a'h'c''''''''''''''''''''''g'n'i'h't'y'r'e'v'e' 'f''''''''''''' 'r'e'v'o' 'l'o'r't'n'o'c' 'n'i' '''o's'''''''''.'s'r'e'v'r'e's' 't'u'o'h't'i'w' ','e'b'y'a'm' ','''' 'd'n'A' ' 't'u'o'h't'i'w' ','e'h't''p'''''''''''r'o' 'g'n'i'k'c'o'''l''''''s' 'es. Basically, special constructions which le''''''''''''''''''''''''''d'l'i'u'b' ''''o'd'''''''''''''''''''''s'r'e't'u'p'm'o'c' 's''''''''''''''''''e'l'g'''''''''''''''''''''''''''t'i'g' 'o't' 'g'n'i'm'm'a'r'g'o'r'p' 'r'i'a'p' 'd'd'a''''o'o'g' 't'u'o'h't'i'w' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e's'a'b'a'''''''''''r'e't's'a'f' 'y''''''' 's'a'w' ''t'a'd''''''''''''''''''''''''''''S'O'X'A'P' 't'u'o'h't'i'w' 'n'o'i't'a'c'i'l'p'e'r' 'r'e't's'a'm'-'r'e't's'a'm' 'o'd'''''''e'l'g'o'o'''''''''''''''''''''''''''''''g'''''''.'t'i'G' 'o't' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'd'd'a'g' 'f'o' 't'''' 'u'o' 's'r'e't'u'p'm'o'c' 's''''''''''''' 'r'o' ','s'c'o'd' 'e'l'g'o'o'g' 'f'o' 't'u'o' 'e'l'g'o'o'g' 'e'k'a't' 'n'a'c' 'e'w' 'o'S'''' 'r'O' '.'g'n'i't'i'd'e' 't'n'e'm'u'c'o'd' 'e'm'i't'l'a'e'r'''t multiple computers / users all edit the same data at the same tim'''''''''''''''''''''''''''''''''''''''''''''s'u'''a' ' 't'e'l' 'n'a'c'''''''''''''''''''''' ','t's'a'f''''''''''''''''''''''''''' 't'n'e'''.''''''w''' 't'u'B'''s't's'i's'n'o'c'-''''c'y'l'l'a'u't'n'e'v'e' 'e'k'a'm'''''''''''''''''''''''''''''t'u'o'h't'i'w' 'n'o'i't'a'c'i'l'p'e'r' 'e's'a'b'a't'a'd'''''''''''''''''''''''''''''' 'r'o' ','s'c'o'd' 'e'l'g'o'o'g' 'r'e'e'p'-'o't'-'r'e'e'p' 'd'l'i'u'b' 'u'o'y' 't'e'l' 'y'e'h'T' ''''''''''''''''''''''''''''' '''' 'y'e'h'T' '.'s't'c'''i'l'f'n'o'c' 'g'n'i't'i'd'e' 't'u'o'b'a' 'g'n'i'y'r'r'o'w' 't'u'o'h't'i'w' ','''e'' without worrying about locking or'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n' 'r'o' 'g'n'i'k'c'o'l' 't'u'o'b'a' 'g'n'i'y'r'r'o'w' 't'u'o'h't'i'w' ''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'p'o'c' 's'''e'n'o'y'r'e'v'e'''''y'e'h't' ','r'e'h't'o' 'h'c'a'e' 'h't'i'w' 's'e'g'n'a'h'c' 'r'i'e'h't' 'e'r'a'h's'''''' 'l'l'e't' 's'r'e't'''''''r'e'u'p'm'o'c' 'e'h't' 'e'c'n'O' '.''''''''''' 'd'n'a' ','e'm'i't' 'e'm'a's' 'e'h't' 't'a' '''a't'a'd' 'e'm'a's' 'e'h't''''''''''''''''''''''''e'e'n''''''''' 't'u'o'h't'i'w' 'y'l'l'a'c'o'l''''' 'd'n'a' 'a't'a'd' 'e'm'o's' 't'i'd'e' 'l'l'a' 's'r'e's'u' '/' 's'r'e't'u'p'm'o'c' 'e'l'p'i't'l'u'm''''l'''''''''''''''' 's'r'e's'u' 'e'l'p'i't'l'''''''l't'u'm' 't'e'l' 'h'c'i'h''''i''''''''''''' 'h'c'''''''c'h'i'w' 's'n'o'i't'c'u'r't's'n'o'c'''''''''''' 's'm'h't'i'r'''''''t'i'o'g'l'a' 'l'a'i'c'e'p's' ','y'l'l'a'c'i's'a'B' '.'s'e'p'y't' 'a't'a'D' 'd'''''''D' 'e't'a'c'i'l'p'e'R' 'e'e'r'F'-'t'c'i'l'f'n'o'C' 'e'r'a' 's'T'D'R'C'n'k'n'i'l' 'e'h't' 'e'r'''''''''''''''e'e'r'F'-'t'c'i'l'f'n'o'C''[''a''''https://en.wikipedia.or'''''''''''''''''''''''''''''''''''''''''''s'e'p'y't' 'a't'a'D''''d' 'd'e't'a'c'i'l'p'e'R' 'e'e'r'F'-'t'c'i'l''''-'f'n'o'C' 's't'a'h't'(' 'g/wiki/Conflict-free_replicated_data_typ')'e'(']''n'n''''h's' 't'''n'o'D' ''o's' 'e'b'y'a'm' ',''''''''''''''''''''.'g'n'i'h's'i'l'b'u'p' 'e'r'o'f'e'b' 's'm'a'r'g'''''''''''''''' 's'u'o'i'''r'a'v' 'g'n'i's'.'A'''''''''''u' ',''''''a'i'd' 's'd'e'e'N' ':'T'F'A'R'D''''R' '>'''n'n''''''''''''''''''''''''''''''''''''''')'!'s's'e'y' ','w'o'W''''''''''''''''e'k'i'l''''' ','w'o'w''''''''''w'o'w'(' '''''''(' '''''''''''''''''''''' 'g'n'''''''r'e't's'a'f' ''i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'g'n'i'k'a'M'''''''''''''''''' 't's'i'l''''''''''''''''''''''''x'0'0'0'4' ''''''' 't'y'b' 'e'c'n'a'm'r'o'f'r'e'p' 'g'n'i'v'o'r'p'm'I' ':''o''''p''''''''''''''''t''''o'''''''''''''''''n'o'i't'a'm'r'o'f's'n'a'r'T' 'l'a'n'o'i't'a'r'e'p'O' ''R'R'R'B''''''''''''''''''''''''' 'R'R'R'B' 'o'g' ''''''''r'i'e'h't' '-''''''''''''-' 'n'Th''''''''''''g'n'i't'a'i'r'u'f'n'i' 'e annoying part was that ''s''''S'''''''' smart'''''''''t'r'a'm's' ''o' 'g'n'a'h's'T'D'R'C' 'g'n'i'k'a'M''''''m'o't'u'A' '#'''''''''W'' '!'''''''''''''''''' 'n'o'i't'a't'n'e'm'e'l'p'm'i'n'n'n''''''''''I '''''''''''''n''''n'o' 'g'n'i'o'g' 's'a'w' 'took a'' ''cl'''''t'a'h't' 'oser look at the paper - because something was fishy here. In their paper when a user pasted a big chunk of text (say, 1000 characters), instead of creating 1 operation with 1000 characters, their code split the insert into 1000''''''''''' 'l'a'u'd'i'v'i'''''r''''t'u'o'y'd'n'i'''''''''''''''''''s'n'o'i't'a'r'e'p'o' ''''' 'l'a'u'i'''''h'''o'D'd'v'i'd'n'i' operations. And each of those inserts needed to b''''''''''''l'a'r'e'v'e''''e'm' 's' 't'a'h't'e'' ''processed separately''''e'r'a' '''.'' Duh - of course it'll''''''''''x''''''''''r'u'o'i'v'a'h'e'b''semantics''''''''''r'u'o'i'v'a'h'e'b'o'b'-'k'c'a'l'''''''''''''''''s't'i'd'''''''''''s't'n'''''''''''''''''''''''''''''''''''''''''''','e'm'i't' 'e''''''''''''''''''''''''''''''''''''''''r'''e'd'r'o' 't'a'h'w' 'n'i'''''''''''x'o'b'-'e't'i'h'w''''''''''''''m'e't'''''''''''''g'n'i'm'm'a'r'g'o'r'p' 's'y's' 'e'h't' 'f'o' '' ' 'o's''optimized i'''''''''''e'd'o'c' 'e'h't' 's it, and for what'''''''''''''''''''''''''''''''''''''''''''''''''g'n'i't'i'#''d'e' 't'n'e'r'e'f'*''f'i'd'*'' 'n'i' 'm'r'''o'*''''f''*'r'e'p' 't'''i''' 's'e'o'd'''''Bu''t n''o m''''''''''''''''''''''''''''''''''''''''''''''''''''ther''e ar''e a''''''''''''''''''''''''''''''''''''''If you wait long enough, somebody will find more' N''o ma'e'''tte''r '' bugs.'''''''''''''''''''a' 'n'g'i's'e'd' 'n'a'c'''''''''''''anohter'''''''''''''''''''d'n'A' '.'s'g'u'b'r'''u' 'o'''i'e'v'''a'r'h'''e'o'm''''''''b''r'e't'h'o''semantics'n'a' 's'd''r'n'u'''o'i'i'''v'f'a'''h' 'e''y'l'l'a'u'b''s'u' 'e'n'o'e'm'o's' 'e'm'i't' 'h'g'u'o'n'e' 'n'e'v'i'g''''''''''''a' 'e'r'a' 'e'r'e'h't' ','e't'i'r'w' 'u'o'y' 's't's'e't' 'y'n'a'm' 'w'o'h' 'r'e't't'a'm' 'o'N'''''''''m' 'o'n' 't'u'B' ''''''''''''''a''' 'e's'i'w'e'k'i'*''L'' ''*'f'i' 'd'n'a''''*'''''*''a'n''''''''''''''''''''n'''''''''''''' 'm'e't's'y's''''''''''''''''' 'r'e't''''e't'a'm' 'o'N' 'e'h't' 'f'o'''''''o' ''o'i'''t'a't'n'e'm'e'l'p'm'i' 'y'r'e'v'e''''l'l'a'' ',''' '?''''''''''''''''''''''''''''''''''?'s'e'l'''u'r' 'e'h't' 'e'r'''a' 't'a'h'W' '''' '?''e'h't' 'o'd' 'r'o' ','''''''' '?'w'o'H'''''''''''''''''t'c'i'l'f'n'o'c' 'y'e'h't' 'o'D' '?'d'e'g'r'e'm' 'y'e'h't' 'e'r'A''''m'a's''''e' 'e'h't' 't'a' 't'x'e't' 'f'o' 'n'o'i'g'e'r' 'e'm'a's' 'e'h't' ''''e'i'l'c' 'o''''''''''''''''i'l'c' 'p'w't''''''''d'n'e' 't'n'e'r'r'u'c'n'o'c'b' ' be slow if you do that! This isn''''''''''''''''''''''''''n'e'h'w''''''''''''''d'n'''d'e'u'o''F'''''''''''''''''''''e's'r'e'v'i'n'U' 'e'h'T' 't'u'o'b'''A''''''t'u'o'b'[''a''''s'''''o'b''''https://github.com/josephg/diamond-'#'type')'s'(']'r'a' 't'n'e's' '' 's'''''''''''''''r''6'''54''''65'''''4''''6'''6'5'''''''5'4''''''''''r'e'v'o' ''''''4'5''''''''''u'''''o'''''i'''d'v''e''a'h'c'h''t''e'e''''''''''''''''' 'e'b''l'o'h'w''' 'a'''f'o' 'semantics''' 'f'o' 'e''r'''''u'''''o'''''i'''''v'''o'a''t''h' 'd'e''e'd'e'e'n' 'y'e'h't''b'n'O' '.''''r't's'r'e'v'o' 'y'l'b'a'b'o'r'p' ''''''''''''t'o'n' 'd'n'A' '.''a'w' '''''d'e'k's'a''t'r'a'p' 'g'n'i'y'o'n'n'a' 'e'h'T''t a problem with the a''''''''''''''''''''-''''e'b'u't'u'o'y''''''''''p'y't'''='s's'a'l'c''''''''''''''''''''''''0'0'1'='''''''''''''0'1' ':'h't'd'i'w'-'x'a'm' 'l'''min'''''''-'x'a'm'''''''''''-'x'a'm''''''n'i'm''width='560' height='315' '''go''''''''''''''''''''''''''''''''''''''''''''''''''''p'u' 'e'd'o'c''''''''''''''d'e'w'e'i'v'e'r' 'r'e'e'p' '' 'o't' 's'n'o'''''''''' 's't'a'h'T''''''''''''''n''' 's'i' 'h'c'i'h'w' ',''''''.'N'''''t'h''''''''''n'A''''a' 's'i' 'A'G'R' ''''''g'''''i'''''r'i't'a't'n'e'm'e'l'p'm'.'B''''''''''''''''''''''''d'n'i'f' 'l'l'i'w' 'y'd'o'b'e'm'o's'''''''''''''''''''''a' 'e't'i'r'w' 'l'l'''i'w' 'e'r'e'h't''''i' 'e'''r'o'm''''''m'i' 'f'o' 'h'c'n''''''''''''' 't'u'o' 'e'n'o'e'm'o's' ''u'b' 'a' 's'a'h' ''''''o'h'w''''''''g'n'i'h's'u'r' ','rithm. This is just a prob'''''''''''''''''''''''''''''''''''''''''''''''''''''''''?'r'u'o'i'v'a'h'e'b' 's'''m'e't's'y's' 'e'h't' 'e'b'i'r'c's'e'd' 'h'c'i'h'w' ''''?'s'e'l'u'r' 'e'h't' 'e'r'a' 't'a'h'W'lem''''''''''''''''''''''''''''''s'n'u'''''''''''''''''''''''''''''''''''s'u' 'l'l'e'''''''l'l''.'A''''''t''' 'y'l'l'a''''l'u't'c'a' 't'a'h't''' 's'''''' 't'a'h't'e'o'''''''''''''''''''''''e'r'o'm' 'o'n' 'e'r'a' 'e'r''d''''''''''''''''''''s' 'y'l'l'a'e'r''''''''''''''''t'a'h't' 'm'o'r'f' 'r'e'f'n'i' 'e'w' 'n'a'c' 't'a'h'w'''''''''''''''s'e't'i'r'w' ''','e'b'y'a'm' ','' ','y'l''r' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'y'm' 'f'I'''''''' 'n'e'h'W'''''e'k'f''''o''t'''''''''''''''''' '?'I' 's'a'w''n''n' 'o'h'W'u'''''''i'l' 'm'e'e''''''''''''''''''''''''-' 'e'r'e'''''''r'o'w' 'y'l'l'a'e'''''' 'a'','v'a'j'r'''''''''''''e'r'e'w' 'y'e'h't' 't'a'h'w' ''s' '''''''''''''''''''o't''f'o'' 's'k'n'i'l' 'e''''m' 'g'n'i'd'n'e's'with *their particula'''''''g'n'i't's'e't'r implementatio'' 'a'n*.''I wouldn't min''','d so much if I didn't have so many people'''''''''g'n'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'I' 'n'e'h't' 'd'n'u'o'r'a' 'e'm'i't' 'e'm'o'S''''a'n''n''''''''''''''''''''''''''''''''''''''''''''''''''''' ','''' 'h'g''''''''''''''''''''''''''''''''''''''''''''''.'''s'n'o'i't'a't'n'e'm'e'l'p'm'i' 'r'e't's'a'f'''''''''''''''' 'o'd' 'o't' 's''''''''''''''''''''''''''''''''e'm'a's' 'e'h't' 's'a'h' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'h'c'a'E''''I'' 'a'''''''o''''''''''''o't' '''''d'''e'd'i'c'e'd' 'g'a''''''''''''''''''' 'o's' 'r'o' 'y'a'w' 'w'e'n''''''''''''''''''''''' 'o't'''''''s't'a'h'T'''w''''''''''''''o''''''''m'i' 'r'e't's'a'f' 'h't'i'w' 's'e's'r'a'-'t'r'a'm's' 'r'e'g'g'i'b' 's'y'a'w'l'a' 'd''''''''' 'k'n'i'h't' 'I'n'A' '.'s'g'u'b' 'e'r'o'm' '''''u'u'o'n'e' 'g'n'o'l' 't'i'a'w' 'u'o'y' 'f'I'''''''''''''''''''''''''s'M''y''''''''''''''''''','g'n'i'c'i't'o'n' 't'u'o'h't'i'w' ',''a'w'l'a' 's'''e'r'e'h't' 'e'm'i'''t' 'h't'i'W' ''s''''n'i'''' 'n'o's'i'r'a'p'm'o'''''''''''''''''''''''''''''''''''''''''''''''''''''''e'n'c'e'i'c's' 'a' 't'o'n' ','t'r'''a' 'n'a' 's'i' 'g'n'i'k'r'a'm'h'c'n'e'B' '''n''''t''p'n''m'c'''''''''''''s'i' 'e'g'r'e'm'o't'u'A' '''''''''''''''''''''''''''''' 'e'r'''','a' 's'd'e'e'p's' '''m'h't'i'r'o'g'l''''''e't'i'u'q' ''''''''''''''''''''' 'y't'i's'r'e'v'i'n'u'a'''p's' 'd'e'h's'i'l'b'u'p''''''''''''''''' 's'i'h't' 't'a'h't'''''''''' 't''''''''e'i'r't' 'u'B'''''''''''''''''''s't'''c'e'p's'a'''''''''''I' '.'''''''''''''''''d'a'h' 's'T'D'R'C'''''''''''''''''''''''''''''''''''''''''''''' 't'u'b' 't'h'g'u'a'N'''''''''''''n'''n'n'''''''n'n''''''''''s'd'n'a'l' 'e'g'n'a'r't's''''''m''' ''''''''''''''''''''''''s'''''''''''''''''''a''''''''''''''''''''''''''''''''v'e''''v'''''''''''''0'2'0'2' 'm'o'r'f' '''''''''''''''''''''n'n':'k'l'a't' 's'i'h't' 'n'i' 'l'l'i'w' 'I' 'n'a'h't' 'r'e't't'e'b' 'r'a'f' ''''''e'g'r'e'm'o't'u'A' 's'n'i'a'l'p'x'e' 'n'i't'r'a'M''''''''''''''''''''i' 's'n'i'a'l'p'x''''''*'*'*'e' 'n'i't'r''''''''''''''I' 'e'n'i'''''''*''''''*'''*''''''''''''''''.'A'''''''A't'n'e'm'u'c'o'*''d''' 'y''*'t'p'*''m'e' 'n'a' 'o't'n'i' ''''.''''g'a'm'I'n'''''''''''''''''''''''''s't'r'e's'n'i' '''c'b'a''' 'h't'i'w' ''''e'e'e'r't'''(']'['!''n'''a'M'n'n'')''''''d'n'a'l''''''''s'l'e'n'n'u't' 'e's'o'''')'h't' 'm'o'r'f' 's'e'm'o'c' 'y'l'n'O'''''''''''''*'''''s''''''''s'*'' 'e''*''.'B''''''''''''''''*'''''''''''''g'v's'.'*''o'i'w''*'a'r'd'.'1'e'g'r'e'*''m'o''''''''''''''''''c'b'X'a''' 'h't'i'w' 'e'e'r't''t'u'a' '''>''n'n''''*''''n''-0.5 -0.5 192 162' style='max-width:100%;max-height:162px;'>
a
a
''''''n'n'
'n'n'' 'g'n''''''''''''''''''''''''''''''''''''r'a'i'l'i'm'a'f' 'y'l'b'a'k'r'a'm'e'r' 's'i' 't'l'u's''''''''''l's'u'e'r' 'e'h't' ','''i'''t'i'd'e' 'e'h't' 't'u'o'h'g'u'o'r'h't'''''''''''t'u'o'h'u'g'o'r'h't' 'd'e'n'e'p'p'a'h' '''c'a'e''r'e'h'w' ''w' 'f'I''''''''''r'a'l'u'c'i't'r'a'p' 'n'i' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''':'n!'''''''''''''''''''''''''''''''''''' 't'n'e'm'u'c'o'd' 't'u'o'h'g'u'o'r'h't' 'n'o'i't'i's'o'p' '''''''n'i't'i'd'E'[reference crdts implementation zoomed in]''''''s'o'p's'n'i'(ref_perf3.svg)''d'e'i'l'p'p'a' 'g'n'i'h't'o'o'm's' 'd'n'a' 'g'n'i't'e'k'c'u'b''''''''''' 'g'n'i'g'a'r'e'v'a' 'e'm'a's' 'e'h't' 'h't'i'w' ',''''.'e'k'o'r't's''''t'y'e'k' 'y'''''''''''''''e'g'n'a'h'c' 'y'r'e'v'e' 'r'o'f' 'n'o'i't'i's'o'p' 't'i'd'e''''s'n'i''''e' 'e'h't' 'f'o' 'h'p'a'r'g'''''''''''''''' 'e'h't' 's'''e'r'e'H' '?'e'p'a'h's' 's'i'h't' 'e'v'a'h' 'h'p'a'r'g' 'e'h't' 's'e'o'd' 'y'h'W''n'n'n'a'w' ''''''''''n'a'w''''''u'o'y' 'f'I' '.'''''''''''''''''''''''''''''''''''''''''''''o't' 'd'n'o'p's'e'r'r'o'c' 't'a'h't' 's'e'o'd'''''''h't' 'x'e'd'n'i' 't'a'h'w''''''''''''''''''e's'a'c' 'g'n'i't'i'd'e' 't'n'e'r''I'r'u'c'n'o'c'-'n'o'n' 'r'o'f' 'n'o'i'''' '''''''''''''''''s'u''''''''' 'y'l'r'a'e'n'i'l''o'i'r'a'v' 'o'd'''''''''''''''''''''''''''''''''''''0'0'4'='t'h'g'i'e'h' '''' ''''''''''''''''https://invisiblecollege.s3-us-west-1.amaz'Y'''onaws.co'''0'0'3'm/braid-meeting-10.''''''0'''''''''''''''4'p'm'/'o'e'd'i'v'='e'p'y't' ''>''''n ''''''''>'o'e'd'i'v''''''''''v'i'd'/'<' ''7'2'=''''-'t'#'mp'''4'='c'r's' 'e'c'r'u'o's'<' 'n'>'s'l'o'r't'n'o'c' 'o'e'd'i'v'<'n'n''''''''''''''.'g'n'i'p'e'e'k'k'o'o'b' 'd'e't'r'o's's'a''''s' 'd'n'A' '/'/' '''''''''' '/'/'n'''n 'n doc.version[id[0]] = id[1]' '''''''n'o'''''''n'i't'a'z'i'm'i'''t'p'O' '/'/' '''''const int''''''''''D''''d''''''''''''''''s'e'p'y't' 'd'n'o'm'a'i'D'[''''D' ''''''''d'n'o'm'a'i'D'd'e'l'l'a'c' ''' ''''''a' ' 'https://github.com/josephg/diamond-types' '' 'n ' if (newItem'n let oparent = findItem(doc, o.originLeft)'''.seq > o.seq) breakn' 'egrate''AutomergeSmol = (doc: Doc, newItem: Item)''''''''''W'O'L'S' '/'''''''''' '*'*'/' ' => {n const {id}'''''t's'n'o'c''''''t'e'l''' = n''' ','i'ewItemn'''n ' ' // Scan to find the insert locationn'' '''''''i' 't'e'l' ' doc.'[''''''''''''https://en.wikipedia.org/wiki/Range_tre')'e'(']'''e'e'r't' 'e'g'n'a'r'version[id[0]] = id[1]nn'' let p''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'e'i''''''u' 't'u'B'''''f'i'd'o'm' 'y'l't'h'g'i'l's''''''''''''''u''' 't'u'B' '.'e'e'r't'-'b' 'a' 't's'u'j' 'y'l'l'a'u't'c'a''''''''''j' 'y'l'l'a'u''''''''''''''''l'l'a't'u'c'a' 's'i''''''' 's' 'e'e'r't' 'e'g'n'a'r' 'y'm' ','d'o'o'h' 'e'h't' 'r'e'd'n'U'''''''''''''''''''''''''y'l'l'a'e'r' 's'i' 'e'e'r't' 'e'g'n'a'r' 'e'h'T''''''''''''''''''''''''''''''''''''' 'a' 's'e's'u' 'y'l'l'a''''l'n'r'e't'n'i' 'e'e'r't' 'e'g'n'a'r' 'e'h'T''''''r'e't'n'I' ''''''''''''' 'm'''I''''''' 'd'n'A'''''''''e'g'n'a'r' 'y'M''''''' 'A'' '''' 'arent = findItem(doc, newIte''>''''''''''''''''''''''''''''''''e'[''h'T' '?'t'h'g'i'r' ','e'e'r'''''https://en.wiki'3'''pedia.org/wiki/Range_tre')'e'(']''''''''''''''''d'n'o'm'a'i'D''k'a'e'w''''d'a'b''''''''''''''''''''3'''''''''''''''''''''''''''''''''''''''''''''.'e'r'e'h' 'g'n'i'o'd' 'm'''I' 't'a'h'w' 'f'o' 'n'o'i't'p'i'r'c's'e'd''''''''''t'a'm' 'r'o'o'p' 'y't't'e'r'p' 'a' 's'i' 's'e'e'r't' 'e'g'n'a'r' 'n'o'''''''''''y't't'e'r'p' 's't'i''t' 'e'g'n'a'r' 'a' 's'i' 's''3'''i'h'T'''''''''''''''''''''''' 'e'l'c'i't''''i'r'a' 'a'i'd'e'p'i'k''4'''i'w' 't'a'h'T''''''''''k' 'I''''''''''''''''''t'''n'd'i'd' 'I' 'e'r'u's' 'm'''4''''I''' Does this have a name? I've been calling it a 'range tree', but I think that name is [taken by another data structure](https://en.wikipedia.org/wiki/Range_tree)n'n'''m''.originLeft)nn let inn // Scan to find the insert locationn for (i ='''''4''''''''''''''''''''''.''''''''''''''' 'r'a'e'n'i'l'Black magic'''''y'r'e''''''''''''''''''''''''''''''''.'a'e'd'i' 'o'n' 'e'v'a'h' 'I''''''''f'o' 'h'c'n'u'''''''''''l'l'e'w' 'd'e'k'r'o'w''b'''' '''''''''''''''''''I have no ide''''''''''''''''''''''''''''''''''''.'t'[''s'e'b' 'e'h't' 'e'b' 'o't' 't'''https://github.com/josephg/diamond-j')'s'(']''u'o' 'd'e'k'r'o'w' '''''''''''t's'e'b' 'e'h't' 's't'a'h't' 'y'h'w' '''a''. ' ' '''''''''''''''''.'t's'e't's'a'f' 'e'h't' 'n'a'r'''''''''''''''' 'e'b' 'o't' 'd'e'n'e'p'p'a'h'''''''''' 'd'e'm'e'e's'''''' 't's'u'''j'n'e'h'w''''' 'r'o'f' 't'c'e'p''Y'''x'e' 'e'w' 't'a'h'w' ''o't''''s'''''''''''''''''''''''''''''''''''''''''''' '.'k'c'e''''''''''''t'p'i'r''''d'''c's'a'v'a''''''''''''''''''t'''s'u'r' 'n'i' 'y'l't'c'e'r'i'd''j'''''''''''''''''''''e'h't' '''n'u'r' 'd'n'a' 't'a'h't'https://github.com/j''''e'w' ','oseph'''l'l'a''''e'h't'g/diamond-types/blob/42a8bc8fb4d44671147ccaf341eee18d77b2d532/benches/yjs.rs'' 'l'l'a' '''n'e'l't't'o'b' 'a' 'w'o'n' 's'i' 'M'S'A'W' 'd'n'a' 't'p'i'r'c's'a'v'a'J''I'''''Rust gives us total control over the memory layout, so we can pack everything in tightly. Unlike in the diagram, each leaf node in my b-tree stores a block of 32 entries, packed in a fixed size array in memory. Inserting with a structure like this results in a little bit of memcpy-ing, but a little bit of memcpy is fine. Memcpy is always faster than I think it will be - CPUs'''''''''''''''''''''''''''' '''''' ' ' ' ' ')'s'j'e'd'o'n''''''''''''''''')'e'''''''v'i't'a'n'(' 'd'n'o'm'a'i'D' 'a'i'v' 'm's'''''''m's'a'w'(' 'd'n'o'm'a'i'D' can copy several bytes per clock cycle. Its not the epic hunt of a main memory lookup'''''('n'n'''.''6'5''''''''n'''i' ''c'r'u''''''''''' 'h'c'i'h'w' '-' ''o's' 'p'e'e'D' ':'g'''''''''''''''''''''''''''e'r''''t's'a'f''u't'''''''''''''''e'r'a'w'd'r'a'h''''''''''.'r'e't'u'p'm'o'c' 'y'm' 'n'o' '''''''''''''''''''''''''''''''''' 's't'a'h't' 'y'h'w' 'a'e'd'i' 'o'n' 'e'v'a'h' 'I' '''c'u')''r'''''''''''''''''''' 'w'o'n'k' 't'''n'o'd' 'I' ''t's' 'a't'a'd' 'e'h't' 'g'''''''''''' 'n'i' 's't'l'u's'e'r'n'i'g'''''4'9'3'1'n'a'h'C''''x'i'F''''F'''''''' 'r'e't''''''''''''''''''.'I''''y''''''''''''' 'y'l't'n'e't's'i's'n'o'c''t'i'p' 'a' ''('t'a'h'w'')' ''''''''''''''''''''''''''''''''''''''''''''''''''':'''':'''''''''''''''''s't'e'L' '.'*'x'x'''x'x''''nWell, a nearly'''''''''''''''''''''''''''n'a'h't''''''''''n'o'i't'u'c'e'x'e' '''''' 'r'e'w'o'l's' 'x'4''','r'e'b'm'e'm'e'r''' ''''''''''''''*'''''t''''''''''''''''''''''''''*''''''''''' 'd'n'A' flat'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''m'o'r'f''''''a'''i'v''' 'd'e't'a''''''''h'g'u'o'''r'h't'''''''a'e'r'e'n'e'g''''j' ''''''''''''''''M'S'A'W' 's'i' 'y'''''''''''''''t'i' 'n''y'l''u'r' 'I' 'n'e'h'w' 'h'W'n'n'''s''''''''' 'r'''''''''''''''''''''''''''''''''''e'v'i't'a'n' 'n'a'h't' 'r'e'w'o'l's' 'h'c'u'm' 'o's' 's'i' 'm's'a'w''''''''''''''''''g'i'b' 'o's' 's'i' 'p'a'g' 'e'h't' ''''''''''''''t'a'h't' 'y'l'l'a'e'r' 'e'd'n'o'w' 'I''i''''''''''''' 'o't' '''w'o'h' 'w'o'n'k' 't'r'a'h'c' 's'i'h''''''''''''s'''M'S'A'W' 's'e'o'd''''''''''''''''l'l'a'e'r''''''''''''''''''''''''?'h'c'u'm' 't'a'h't' 'n'w'o'd' 't'i' 'w'o'l's' '' ''T'''''''''''''''''''''''r'a'h'c' 's'i'h't' 's's'e'n'r'i'a'f' 'r'o'F''''''''''''''''''''''' 'n'u'r' 's'i' 'k'r'a'm'h'c'n'e'b' ''''''''''s'e'd'u'l'c'n'i'''s'i' 's'i'h'T'''''''''''''' '.'n'o'i's'r'e'v' 'w'o'l's' 'e'h't' ''''''''''''' 't'p'i'r'c'''''''''''''''''''''''a'i'v''' 't's'u'r' 'o't'n'i' 'g'n'i'l'l'a'c'''''''d'e'l'l'a'c' ',''s'a'v'a'j''s'w'o'h's''' '''t'r'a'h'c' line. I wonder'''''''''''''''''''''''''''''''''?''T''''''''''''''' ''''''''' ''''''s'i' 's'i'h't',' 'r'e'b'm'e'''m'e'r' 'd'n''''''s'j'''e'd'o'n''A'.'.''''?'t''''o'S' 'u'o'b'a' 's'i' 's'*''s'*''e'n'y'r''f'I''e't't'i'j''''k' 't'a'h't' 't's'''''''r'e'h't'o'n'a'''a'h'w' if the jitteryness is deletes are marginally faster than ''inserts'(' or somet')'hing?'n'''''''''''''''''h'c'u'm' 't'a'h't' '''''''''''''y'r'o'm'e'm' '''' 'a'''''''''''''''''''''''' 'I' ','h'E'''''''''''''''''''''''e'h't''''''''''''''''''''''g'''''n'''''i'''''w'''''o'''''h's' 's'i''''''s'w'o'''''''''''''''''?'g'n'i'h't'e'''m'o'''s' '''r'o''' ':''''''h'''s' '''''s'''s'e'''n' '''f'i''' 'r'e'd'n'o'w' 'I'''''''''''''''''''''''''''''''''''''''''t'i'b'''''''''''''''''''''''''''''''''''''''''''' 'y'l'''''l'a'n'i'g'''r'a'''''m'''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a't'''a'd' 'g'n'i'''m'i't''' 'e'h't''' 'f'o''' 't'u'''o' 'p'o'''p' ''''.'''''''''''''''''a'''g'''a' 'o'''i'''t'a'r''' 'e't'''e'l'e'd' '/''' 't'''r'e's'n'i' '''e'h'''t' 'g'n'i'e'e'''s''' 'e'r'''e'w' '''''o'''s' ',''''y'l't'''''''h'g'i'l's''''''''''''''''''''''''''''''4'''''~'''''''''''''n'i'a'''g'''a''''''''''.'g'n'i'''h'''t'e'm'o's' '''r'o' '''s'''t'r'e's'n'i''''' 'n'a'h't''' 'r'e't's'a'f''''' 'e'r'a''' 's'e't'e'l''''''''''''''''''''' 'e'r'u't'c'''u'''r't'''s' ''''''''''' ''' ' ''' ' ' ' ' ' ' '''''''''''e'g'''a'r'o't's' 'a't'a'D''''e'd' '''e'b'y'a'M''''''''''' ' ' ' '''''''''''''''''|' 'e'g'a'u'g'''n'a'L'''''''''''''g'n'a'L' ''''''''''''''b'a'b'o'r'p' 's'''t'I' '.'''''''''''''''|' '-'-'-'-'-'-'-'-' '''''''''''''s' 'e'h't' 'h'g'u'o'h't' '-' ''''.''' '''''a'''''''''''''|' ' ' ' ' ' ' 'S'J' '' ''+''' ''v''ia JS''''''m's'a'w'+''s't'i' 'y'h'w''''''''''''''''''''''''''''' 's'i' 's's'e' JS |''n'y'r'e't't'i'j' 'e'h't' 't'a'h'w' 'a'e'd'i' 'o'n' 'e'v'a'h' 'I' '.'e'n'i'l' ' JS |''t'a'l'f' 'y'l'r'a'e'n' ','l'l'e'W'n'n'''''''''''''''''''''''''':'e'n'i'l' 't'' JS |'a'l'f' 't'a'h't' 'n'i' 'k's'a'b' 'd'n'a''''''e'''''e'l'f'*''''(' 's'j'y' 'o't''''''''''' 'a'i'v''''''''''a'v'i' ''''''' '+''''''S'J'+''''''''''''''''''M'S'A'W'''''''''''''m's'a'w'/'t's'u'R' JS ''' JS ''''''''''s'e'k'o'r't's'y'e'k' '' |'|' 't'x'''''''#''t's'u'R'e'n' 't'i' 'e'e's' 'y'l'e'r'a'b' 'n'' 'a'c' 'u'o'y' 't'''''''''t's'u'R's'' JS |'a'f' 'o's' 's't'i' ','h'O'''''''''''''''''''''' ''' ''' ''''''''''''t's'u'R'''''')'''e' 'v'''i' JS |''''t'''a' 'n'''(''' '''d')'n'''o'''m'''a's'i''''''j'''''''e'''d'''D''o'''n''' '''a'''i'' JS |'''v''' '''m'''s' 't'''s'u'''j'm'''s'''''''d'n'o'm'a'i'' doc'''D''''a'' 'a'''w'd'(''' 'n'd'''n'a'o'''m' 'a'''i'e'r'e'h't' 't'i'b' 'a' 'n'i' 'm'D''o'o'z' 's't'e'l' ','m'H'n''n's''''''''''''''''''''''e'k'i'''''''''s'e'o'g'''''''''''''''''''i''' 'r'''e'''''''''''.'''''''''''''''''''''d'n'o'm'a'i'd'''''''['''''''d''''''''''t's'u'r' 'o't'e't'r'd'''n'o'o'''m'''a'''i''s't'e''r''d'e''g''''''p' 'k'r'a''r'e''m'h'c'n'e'b' 'e'm'a's'there'''''''''''''''''''''' 'k'''r'''''6'9''''''0'.'0'''a'''''m'h'c'n'e'b' 'e'h'T'''''''''''' 'd'n'a' 't'p'''e'h't''i'r'c's'a'v'a'''''''''''''t's'u'r' 'h'g'u'o'r'h't' ''j't's'a'f' 'n'e'v'e' 's't'e'g' 't'I''I''''''''''''''''''''''''''''s'i'h'''''''''''''''''''y'l'e'v'i't'a'n' 'g'n'i'n'n'u'R'''''''''t' 'e'k'i'L' '.'''t' '['''''''''''''''''y'l'''h't'''' ''n'u'r' 'd'n'a' ''''''''''''''''''''''''''''' 'd'n'a' 'm's'a'w' 'p'i'k's' 'e'w' 'f'i' 'r'e't's'a'f' 'n'e'v'e' 's't'e'g' 't'I''l' ''s'e''''''''''''''''f'o' 't'i'b' 'e'l't't'i'l' 'a'r'u't'c'u'r't's' 'a' ''https://github.com/josephg/diamond-types/blob/yjs-style/benches/yjs.rs'h't'i'w' like t''T'f' ''''''''''''y'a'r'r'a' 'n'a' 'n'i' ''''''''''''''''''''''''''s'e'r'u't'c'u'r't's' 'a't'''a'd' 'g'n'i'g'n'a'h'C''''F'''n'n'i'n'''r'a''''''w''' 'd'n'A'W' parent + 1; i < doc.content.length; i++) {n ' || (oparent === parentn ''''''''''' 'y'l'b'a'n'o's'a'e'r''' && (newItem.seq === o.seq)'' || '6'('5'opa''rent'' === parent && (newItem.seq === o.seq)n && id[0] < o.id[0])'' || (oparent === parent && (newItem.seq === o.seq) && id[0] < o.id[0])'' '''1'.'1''' '' ''|| (oparent === parent && (newItem.seq === o.seq)'' || (oparent === parentn && (newItem.seq === o.seq)'' || (oparent === parent && (newItem.seq === o.seq)n && id[0] < o.id[0])'' || (oparent === parent && (newItem.seq === o.seq) && id[0]'' < o.id[0])'' || (oparent === parent && (newItem.seq === o.seq)''''''n'-'-'-'n' ''let '''3'9'1'''o = d'''''' 'r'e'd'n'u'oc.content[i]n let oparent '''''''''''''''''''''''''!'')'g'n'i'm'o'c'n'i' 'c'i'g'a'm' 'k'c'a'l'B''''''''''''''''' 's' 'i's'i'h'T'(' '= findItem(doc, o.originLeft)nn // Should we insert here?n if (oparent < parentn || (oparent === parentn && (newItem.seq === o.seq)n && id[0] < o.id[0])n ) breakn }nn // We've found the position. Insert at position *i*.n doc.content.splice(i, 0, new''Item)n doc.max''6'5'Seq = Math.max(doc'''''r''''0'0'0'5''''1''e'v'':'''o' '.maxSeq, newItem.seq)n}''''''''`''''''''''''''''''''''''''''''''''''''''''''''''''''''''T''' '.'0'0'0','''''''0' '0'0'2' 'd''''''''''''''''''r'e'h't'o' 'h'c'a'e' 'r'o'r'r'i'm'n'u'o'r'a' 's'''''e'''''.''''n'i'l''''''''''''''''e'r'e'h't' 'n'o' 'g'n'i'o'g' 's'' 'o'w't' 'm'o't't'o'b' 'e'h't' 't'a' 'k'o'o'l'''' '''''''''n'''nnThat, my friends, is how you make the computer do a lot le'n'ss wo''''#'#'rk.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!''''''''''?'!' 's'i' ''''''' 's't'a'h't' 't'a'h'w' 'r'e'd'n'o'w' 'I' '.'a's'r'e'v' 'e'c'i'v' 'd'n'A' '.'r'e't's'a'f' 's't'e'g' 'm's'a'w'-'t's'u'r' ','w'o'l's' 's'i' 's'j'y' 'n'e'h'w' 's'd'o'i'r'e'P' '''''''''''.'p'u' 'e'n'i'l' 'f'o' 'd'n'i'k' 'm's'a'w'-'t's'u'r' 'd'n'a' 's'j'y' 'f'o' 's's'e'n'y'''''''y'n'r'e't't'i'j' 'e'h't' '-' 'h'u'H'''''''''l'o'o'c' 's't'I' '>''''I'n''n'`'''''l''' 't'u'B''`'n'n'n'6''''5''''t'p'i'r'c's'a'O''v'a'j'`'`'`'n'''''''''a't'a'd' 'e'h't' '''n'n''''''''''''''''''':'s'i'h't' 'e'k'i'l' 's'k'o'o'l' 'e'g'r'e'm'o't'u'a' ','d'e't'c'a'p'm'o'C'''''p'm'o'C''''''m'o't'u'A'''''''''' 's'k'o'o'l' 't'I'''''''''' 'e'r'''o'y' 'f'I' ''' 'y'n'a' 'e'k'a'm' 't'''n's'e'o'd' 'd'n'e'k'c'a'b' 's'r'-'e'g'r'e'm'o't'u'a'''''''''''''''''''''''''' 'd'e'w'''a'l'f' ','l'u'f'i't'u'a''''''s''''s'k'o'o'm' ''e'b'''k'c'a'b' 't's'u'r' 'e'h't'''''' 's'i'h't' 'o't' 'g'n'i'h'c't'''''''t'c'i'w'S''''W''O''y'd'a'e'r'''''''''''''''''''''''''''''Plain string e''9''''0''''2'1'''d''its in JS'''''''' ' ' ' ' ' ' ' ''''''''''''''s'a' 'e'm'a's' 'e'h't' 't'''''''''''''''''''''''''')'g'v's'.'s'r'm'a'_'s'v'_'m'a'('''1'.'1'''''']'''['!''''@'''''''#'n'n':'''s'o'm'l'a'''''''''''e'h't' 'y'l'r'a'e'n' 's'm'r'o'f'r'e'p'''' 's'i' 'e'd'o'c' 'e'h't'' 's't'i' 'e'r'o'f'e'b' '''''''''''''s't'e'g' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'.'e'm'i't' 'r'e'v'o' 'e's'r'o'w' 'y'l'l'a'u''''u'd'a'r'g' 'g'n'i't't'e'g'''''''''''''''''''''o'w' 'g'n'i't't'e'g' 'y'l'l'a'u'd'a'r'g'''''''' 'y'l'w''''''''''s's'e'u'g' 'I''''''''''''#'#'''''''''f'o' 't'u'o' 's'e'm'o'c' ' ''o'l'![rust implementatio''''n in wasm vs Yjs](rust_perf6.svg'n')n''s' 's'i' 'e'c'n'a'm'r'o'f'r'e'p' 'y'l'r'a''7'''e'l'C' '.'''''''' 't'u'b' '-' 't'i'b' 'a' 't'u'o' 'g'n'i'h't'y'r'e'v'e'''''''''''''''' 't'u'o' 'n'g'i'h't'y'r'e'v'e'''' '''' ' 'e''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'n'o' 's't'n'e'm'm'o'C''''''''''''' 'f'o' 's't'o'L''F''Read'''s'i' ' f''F'''''''''''''''''n'o' 'k'c'a'b'd'e'e'f' 'd'a'e'R'''''''''' 's't'o'l' 'd'n'A''''S''''''
b
c
c
(root)
(root)
Viewer does not support full SVG 1.1'''h't' '''''''''''''''''''d'e'b'i'r'c's'e'd' 'h'c'i'h''''''''s'm'e't's'y's'w''''h' 'd'''''''I' 'd'''d'e'''n'''''A' '.''''''n'''''a' ','s'c''''s'i't'n'a'm'e's' 'e'm'a's' 'e'h't' 'k'o'o't''''o'''n'a'r'' 'I''''''''''''''th''' academi''' literatur'''''''''''''c'i'm'e'd'a'c'a' 'n' 'e'c'e''''The Literature ''''''''''''''''''''''''''''''''' 'e'r'u't'a'r'e't'i'l' 'c'i'm'e'd'a'c'a' 'e'h't'''''''''''''''''' 'e'r'u't'a'r'e't'i'L' 'e'h'T' 'n'i'''''''''''''''''''''' 'e'h'T'n' 'i'''' 'e'h'T''''''''''''''''''''''''''''''''''''''''''''''e'c'n'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''e'm'i't' 't'a'h't' 'd'n'u'o'r'a' 'e'r'e'h'w'e'm'o's'''''''''''''''''''''''''''''''''s'a'w' '''''''''''''''''''''''''''-''W'-'-'n''n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'l'l'a't'o't' 'e'v'a''.'I''''h' 'd'l'u'o'''''''''''''''''''''''''''''''''r'e'''''''''''''''''''t's'a'f' 's'T'D'R'C' 'g'n'i'k'a'M' '#''p'a'p' 'e''''''''''p' 'a'h't' 'g'n'i'd'a'e'r' 't's'u'j' 'm'o'r'f' ''''''u'i'o'w' ''''''''''''''''''''''''''''n'''''''''''''''''''''''''''''''''''''''''''''''f'o''' 'e'r'u't'u'f' 'e'h't' ''''''''''''''''''''''''''' 't''''''r'e'v'e'n' ''''''u'b' ','s't's'e'g'g'u's'''''''t'n'a'c'''''''''''''''''''''''''''''''''''''''''''' 'c'i'm'e'd'a'c'a'''''''''''d'n'a' 's'r'e'p'a'p' 'g'n'i'd'a'e'r' '''''''''''''''''''''''''''''''''''''''''''''!'s's'e'n'd'a'M' '?'r'e't'c'a'r'a'h'c' 'y'r'e'v'e' 'r'o'f''''a' 'D'I'U'G' 'A' '.'''d'''e'p'''' 'p'o't's' '''''''''''''''''' ','m'e'h't' 'd'e's's'i'm's'i'd''''''''''d'e'm'u's's'a' 'I' ''''''''r'e'''''''''''''''''''''''''''''''t'''n'e'm'e'l'p'm'i'' 'o't' 'y'a'w' 't's'e'b' 'e'h't''''''''''''''''e's'o'h't' 'e'k'a'm' 'o't' 'w'o'h' ''v'e'n' ''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'w'o'l's' 'e'b' 's'y'a'w'l'a' 'l'l'i'w' 'm'e't's'y's' 'e'h't' 'e'v'o'r'p' 't'''n'a'c' 't'u'b' ','s't's'e'g'g'u's' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'e'v'o'r'p' 'y'l'n'o' 't'i' 't'u'b'''''''''' 't'u' '-' 'w'o'''l'''s' 's'i' 'm'e't's'y's''''''''''s'c'i't'n'a'm'e's' 'e'h't' 's't's'e'g'g''''''''''''''''''''''''''' '''''''d'a'h' 'e'b'y'a'm' '-' 'e's'r'o'w' 's't'i' 'e'b'y'a'M'u''''a's''''p' 'n'o''''' 'e'''d'e'v'a'h''i't'a't'n'e'm'e'l'p'm'i' 'w'o'l's' 'a' 'd'n'A' '''''''''''''''''''''''''''''''''''''''''''''''''''''''l' 't'''n'e'r'a' 'u'o'y' 's'e'v'o'r'p' 't's'u'j' 't'I' '.'s'g'u'b' 'f'o' 'e'c'n'e's'b'a' 'e'h't' 'e'v'o'r'p' 't'''''''t't''''u'B' 'n's'e'o''''''''y'l'l'a'e'r' 'd' 'e't'i'u's' 't's'e't' 'g'n'''i's's'a'p' 'a''''''''''n'a' ' '-' 's't's'e't' 'e'k'i'l' 's't'i' 'e'b'y'a'M' ''o'i't'a't'n'e'm'e'l'p'm'i' 'w'o'l's' 'a' 'm'o'r'f' 'n'r'a'e'l' 'e'w' 'n'a'c''''s' 't'a'h'W''When our implementation ''runs slowl''y,'''''''''''' 'd'l'u'o'h's' 't'a'h'w''''''''''''''''''''''''''''g'n'i'h't'y'n'a' 's'u' 'h'c'a'e't' 't'a'h't' 's'e'o'd'''''''''''''''''''l'u'f'g'n'i'n'a'e'm' 't'a'h't' 's'i'''''''''''''''''''''?'n'a'e'm' 't'a'h'''''w''' 'd'n'A''t' 's'e'o'd' 't'a'h'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e'v'l'o'v'n'i' 's'e'r'''''''''''.'s'c'i't'n'a'm'e's' 'e'h't' 't'u'o'b'a' 'g'n'i'h't'y'n'a' 'g'n'i'v'o'r'p' 'e'r'''e''''''''''r'e'h'w''''t' 'f'i' 'w'o'n'k' 't'''n'o'd' 'I'''''''''' 'e'w' what are we actually proving?''W''''''''''''''''''''''''''''''''''''''''''''''''''''''''?''''''w''' 't'u'B'I' 's'a'w' 'o'h'w' ','t's'a'f' 'm'e'h't' 'e'k'a'm' 't'''n'd'l'u'o'c' 'm'e'h't' 'd'e't'n'e'v'n'i' 'o'h'w'''''''''' 'd'e'v'l'o'v'n'i' 's'r'e'h'c'r'a'e's'e'r' 'e'h't' 'f'I' '.'r'e'h't'e'g'o't'l'a' 's'T'D'R'C' 'd'e's's'i'm's'i'd' 'I' ','n'e'h't' 'd'n'u'o'r'a' 't'n'''''''''''''''''''''''''''s''''y'l'?'''''''''s' 'n'u'r' 'n'o'i't'a't'''''e'v''''n'e'm'e''''' 'd'l'o'l'p'm'i' 'r'u'o''''''i''''''''y'a's'''n'a''''''''''t'a'h't' 'w'o'h'''' 's'o'p' 'e'''s'i'm'o's' 't'a' ',''''''''''''''''''''''''''''''''''''''' 's'n'u'r''''''''''''''''''''''''''''''''''''''''''''' 'e'c'n'e't'''''''''''''''''''''''''''''''''''''t'a'h't' 'o'd' 'e'w''''i' 'f'i'''''X'''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h't' 'd'a'e'h'r'e'v'o''''[' 'h'c'''''''''''''''''k'r'a'm'h'c'n'e'b' ''''https://gist.github.com/josephg/13efc1444660c07870fcbd0''b3e9''17638#file-js_baseline-js-L37-L4')'1'(']'u'm''''''''''''''''''''''''''''''''n'a'c' 'e''''' 's'i'h't'''''''''''''''''''j''' 't'u'o' 's'n'r'u't' '''*''t'*''I'''''''''''''''''''''''''''''''''''''''''''' 'a'r't'x'e''''''''''''''''e'k'a'm' 'o't''''''''''''''k'r'o'w' '''''''''automerge (v1.0.0-preview2)'*'''''''''''''''''''''''''''''''''''''''n'a'''J''''c't'i' 't'u'b' ','g'n'i't'i'd'e':'''' 'e'v'i't'a''''''''''t'i'a'r'o'b'a'l'l'o'c''''a' 'r'o'f' 'd'e'e'n' 'e'w' 'n'o'i't'a'm'r'o'''''''''''''a'm'o'r'f'n'i' 'e'h't' 'l'l'a' 'y'a'w'a' 's'w'o'r'h't'''''''''''''''''''t'''n'd'l'u'''''''''n'o'w' 'y'l's'u'o''''u'i'v'b'o' 's'i'h'T' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t's''''''''''''''''''t'n'e't'n'o'c' 'e'h't' 'l'l'a' 'e''''.'''u'''j' 'e'w' ','k'r'o'w' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'e'k'a'm' 'o't' 'n'o'i't'a'm'r'o'f'n'i' 'a'r''''a't'x'e' 'e'h't' 'l'l'a''''''''''''' 'n'o'i't'a'm'r'o'f'n'i' 'g'n'i'r'o'''''''o'r't's' 'f'o' 'd'''' 'a'e't's'n'i''''''''k'r'a'm'h'c'n'e'b' '''' 'e'h't'''''' '''''e'''w' ','s'i' 't'a'h't' 't'n'''''''''''Automerge was just never written with performance in mind. Their team is working on a replacement [rust implementation of the algorithm](https://github.com/automerge/automerge-rs/) to run through wasm, but at the time of writing it hasn't landed y'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't's'e't' 's'i'h't' ''''''''''''''''''''''''''''''.''''-'-'-''n'n'''']''e'd'o'c' 't'p'i'r'c's'a'v'a'j' 's'''e'g'r'e'm'o't'u'a''''''''''''''''''''''''''a'v'i'u'q'e' 't'p'i'r'c's'a'v'a'j' 'e'h't' 'n'o'''''''''''''''''''''''n'a'h't' 'r'e't's'a'f' 'y'l'e'r'a'b' 's't'i' '-' 't'u'o' 'k'r'o'w' 'o't' 's'k'n'i'k' 'e'm'o's' 'e'v'a'h' 'y'l's'u'o'i'v'b'o' 'y'e'h't' 't'u'b' ','g'n'i'k'r'o'w' 'h'c'n'a'r'b' 'r'e't's'a'm' 'e'h't' 't'o'g' 'I' '''et. On this test the rust co'''''''y'l'n'o' '''''''''''''''''''''''''''' 't'n'e'l'a'v'i'u'q'e''''''''''''''''''''''.'t'p'i'r'c's'a'v'a'j' 'e'h't' 'n'a'h't' 'r'e't's'a'''f'B'''' 'y'l'e'r'a''''r'b' 's'i'''de performs almost''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''['''''''''[''''''''''''''''''''''''''''V'''''8'''https://github.com/automerge/automerge-rs')'/'(']''v' 'n'o' 'g'n'''''''n'g'i'n'n'u'r' 't'p'i'r'c's'a'v'a'j'''''''''''''''''''''''''''''''''''''''''''''''''' 't's'o'm'l'a''''l' 's'm'r'o'f'r'e'p' 'e'd'o'c' 't's'u'r'''''e'd'o'c' 'e'h't' 't's'e't' 's'i'h't' 'n'O''' 'w'':'''a'r''.'''''''''''''''''e'd'o'c' 'e'h't' 'd'n'a' ',''''''''''''I'''''''''''''''''.'t's'a'f' 'y'r'e'v' 's'i' '''''''''t'p'i'r'c's'a'v'a'j' ','''' 'd'n'A''''''''''p'S'(' ''n'''.'e'd'o'c' 'r'u'o' 'l'l'a' 'h't'i'w' 'n'w'o'd' 'd'e'd'a'o'l' 't'''n's'a'w' 't'i' 'f'i' ','o'g' 'd'l'u'o'c' 't'p'i'r'c's'a'v'a'j' 't's'a'f' 'w'o'h' 'f'o' 'e's'n'''''''''' 'e's'''' 'e's' 'a' 's'u' 's'e'v'i'g' '''''''''''''''''''''''''''''''''t'p'i'r'c's'a'v'a'j''''h' 't's'a'f' 'w'o'h' 't'u'o'b'a' 's'w''''''''''s'w'''''''w'l'u'o'h's' 'h'c'i'h'w' ';''''e'i'c'i'f'f'e'n'i'''''t's'a'f' 'w'o'h' 'f'o' ''''''''(' '.'''e''''''T''''''''''''''''''''''''''''''''''''''''' 't'''n'a'c' 'y'l't'c'e'r'i'd' 'g'n'i'r't's' 'a' 'o't'n'i' 'g'n'i'c'i'l'p'S' ''s'n'e's' 'a' 't'e'g' 'o'T''''''''''''''e'n'i'l'e's'a'b' 'a' 's'A'''''''' 'n'a'c' 'e'W'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'e'c''''''' 'o't'n'i''i'l'p's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'l'a'c'i't'e''''i'r'o'e'h't' 'e'h't' 'e'b' 'd'l'u'o'h's' 'h'c'i'h'w' ',''.'g'n'i'r't's' 't'p'i'r'c's'a'v'a'j' 'a' 'o't' 'y'l't'c'e'r'i'd' 'd'e'i'l'p'p'a' 't's'u'j' 'e'r'a' 's't'i'd'e' 'e'h't' 'l'l'a' 'e'r'e'h'w' 'e'n'i'l'e's'a'b' 'a' 'o't' 'e'r'e'h' 't'i' 'g'n'i'r'a'p'm'o'c' 'm'''I'n''n'''''''''''''''''''''''''''It would b''''''''''''''' 'e'b'''''''''''g'n'i's'u'f'n'o'c' '''''''y'l'l'a'e'r''''''''''''''''.'g'n'o'r'w' 'r'e'p'u's' 'e'b' 'd'l'u'o'w' 't'a'h'T' 'e silly making a chart showing how text-ot is both fast and slow. Th''*'*'e difference is in the i'*'mp'*'lementation. An'''d thats true here too -'''''''''''''''''''''''''''''''''''''''''''''w'''''o'''''''''h't'o''''d'n'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '-' 'o'o't' 'e'r'e'h' 'e'u'r't' 's't'a'h't' 'd'n'A' '.'n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'h't' 'n'i' 's'i' 'e'c'n'e'r'e'f'f'i'd' 'e'h'T' '.'''' ''''b' 't'o''''t'-'h' 'g'n'i'w'o'h's' 't'r'a'h'c' 'a' 'g'n'i'k'a'm' 'y'l'l'i's' 'e'b' 'd'l'u'o'w' 't'I'''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''w'o'l's' '' ' ' 's'i' 't'x'e't'-'t'o' 'd'n'a' ','t's'a'f' 's'i' 't'x'e't'-'t'O''' 't'a'h't' 'f'o' 't'r'a'h'c' 'a' 'e'd'a'm' 'u'o'y' 'f'i' 't'u'B''''''''''a'm' 'u'o'y' 'f'I'n''n''''''''''''''''''''e'r'a' '''s'p'u''''''''''''''''''' ''''''''''''''''''''''' 'y'l't'n'e'r'e'h'n'i'''' ''''.'w'o'l's' 's'i' 'g'n'i'h't'e'm'o's' 'e'v' ''o' ''r'p' 't'''n'a'c' 'u'o'y'' 'd'e'e'p's'''''''''''''''''''''''''''' 't'u'b' ','e'l'b'i's's'o'p' 's'i' 'e'd'o'c' 't's'a'f''''' 'e'h't' 'e'v'o'r'p' 'n'a'c' 'u'o'y' '-' 'o'o't' 't'a'h't' 'e'k'i'l' 'l'e'e'f' 's'k'r'a'm'h'c'n'e'B''''P' '.'e'c'n'e's'b'a''W' 'r'i'e'h't' 't'o'n''''''''''''''''''''''''t'u'o'''':''''''''''''''''''''''''''''''''''''''''''''''s'a' 'p'u' 'd'n'e' 't'h'g'i'm' 't'n'e'm'u'c'o'd' 'e'h't' 'n'e'h't' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''b' 'e'h't' 'e'r'o'f'e'b' 'o'g' '*'o't' 's'a'h'*' 'X' 'e'h't' 'e's'u'a'c'e'b' ',''''.'D'I' 'r'i'e'h't' 'n'o' 'd'e's''''e'a'b' 'm'e'h't' 't'r'o's' 't'''n''''''''''''''''''''''''''''''''''g'n'i'd'r'o'c'e'r' 'r'e't'c'a'r'a'h'c' 'y'b' 'r'e't'c'a'r'a'h'c''''''''''f'o' 'd'r'o'c'e'r''''''''''''''''''''''''''''' 'd'e's'a'b' 'e''''''''''''' 'd'''''''''''''''''''''''s'w'o'r'g' 't'n'e'm'u'c'o'd' 'e'h't' 's'a' 'n'a' 'g'i'b' 's't'e'g''e''''''g'u'h'r't' 'e'r'o'c''''''''''''''''''''.'w'o'l's''''l' 'o'o't' ''''''''''''' 't'''n'''''''''''''''''''''.'''w'o'l's' 's'i' 'e'r'u't'c'u'r't's' 'a't'a'd' 's'''''''''''''''' 'd'n'a' 's'e't'a'e'r'c'''''''''''''''''''''''''''''' 's't'c'e'j'b'o' 'y'n'a'm' 'o'o't'''''''t's' 's'e'r'o't's' 'e'g'r'e'm'o't'u'A' '' 'a''a'c' 'e'w' 'n'a'c' 's't's'e'T''Y''''''''''''''''''''' ''e'v'o'r'p'a'c'''' 'y'e'h'T''''g'n'i''''b'a''' 'g'n''''''''''''t'a'h't' 't'u'o'b'a' 'i'y'' 'a''''''''''''' 't'''n'a'c' 'u'o'Y' '.'''s'''''''''''''' '''' ''''''''''''' 'o't' 's'a'h''s''''''''''''''''''''''''.'w'o'l's' ''''''''''''''''''''''''''''''' 'f'o' 'n'o'i's'r'e'v' 'c'i'm'h't'i'r'o'g'l'a' 'e'h't' 's't'I''''''e'b' 's'y'a'w'l'a' '''l'''''''''''''''''''''''''''''''''''-' 'r'e't'a'l' 'f'o' 'e'r'o'm''''''''''''s'i' 'A'T'A'Y' '.' 'e'e's' '''l'l'''e'w' 'h'c'i'h'w' '-' '''''''''''''''''g'n'i'n'u't' '''''''''''''''''''''''''''''''n'u'r' 'r'e't'u'p'm'o'c' ''''''t'i' 'e'h't''''''''''''''''''''''''''h'c'i'h'w' 'A'T'A'Y' 'd'e'l'l'a'c' 'T'D'R'C' ''''''''''''r'a'r''''''''''y'l't'h'g'i'l's' 'b'i'l'''''''l'l'a'm's' ' 'a' 's't'n'e'm'e'l'p'm'i''''''''''''''''m'i'I'' 's'i' 'l'i'''''''''''''''automerge (v1.0.0-preview2)'''''''''m's'a'w' 'h'g'u'o'r'h't' 'n'u'r' 'o't' ''w' 'm'h't'''''RGA''a'''''''''''''''''''e'b' 'o'''''''o's' 'r'o' 't' 'd'e's'o'p'p'u's' '''a''''A'G'R' 'o'''''''''''''''''''''''''''''''t's'a'f' 't'''a'h't''''''-'-'-'n'n''' 'n'''''y''''' 'e'v'a'h''e'h't'u'r' 't'''n'd'i'd' 't'i''''d''''''','''''''''''''''' ''''''''''''''''''''''''''''''''e'l'b'a't' 's't'l'u's'e'r''''''' 'e'l'b'a't' 'y'm' 'o't' 'm'e'h't''''b' 'g'n'i'd'd'a'''''t'i'''''''''''''''''''''''''''e'l'b'a't' 'e'l't't'i'l' 'y'm' 'o't' 'm'e'h't' 'b' 'r'i'a'f' 'a'''''''''''''''''''''''''''''s't's'e't' 'y'm' 'n'i' 't'a'h't' 'n'a'h't' 'r'e'''''''''''''''''''''''''''''''''''''''''''''''''''''.'n'e'h't' 'l'i't'n'u'''''''t'a' 's'k'r'a'm'h'c'n'e'b' 'g'n'i'd'd'a' 'n'o' 'f'f'o' 'd'l'o'h' 'l'l'''I' 'd'n'a' ';'''w'o'l's' 'n'a'r' 't'i'''''''''''''''''t'''n'd'l'u'o'c' 'I'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'a'h' 't'i' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'e's'a'e'l'e'':'r' '''r'o'f' 'y'd'a''''''''''d'a'd'e'r' 's't'i' 'e'r'o'f'e'b' 't'u'o' 'k'r'o'w' 'o't' 's'k'n'i'k' 'e'm'o's' 'e'v'a'h' 'y'e'''''''n'i'h't' 't'c'e'p's'u's' 'I' '.'t'e'y' 't'i' 'g'n'i's'u' 't'n'e'm'e'v'o'r'p'm'i' 'h'c'u'm' 'g'n'i'e'e's' 't'o'n' 'm'''I''''''''''''''''' ''''' '''g'n'i''m''''t'n'e'm'o'm' 'e'h't' 't'a''''''''''''''''''''' 'r'a'l'i'm'i's' 'e'e's' 'I' 't'u'b' ',''''''''''''' 'e'h't' 'n'a'r' 'I' '.''t' ''i'r'o'g'l'a' 'n'a''''''''h't'i'w' '''''t'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'n'o'i's'r'e'v' 'S'J' 'e'h't' 's'a' 'e'm'a's' 'e'h't' 't's'o'm'l'a' 's'a'w' 't's'e't' 's'i'h't' 'n'i' 'e'c'n'a'm'r'o'f'r'e'p''''u'b' ',''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' 't'a'h't''''''''.''''''''''''''''''''''''' 'o's' '-' 'n'o'i's'r'e'v' 't'p'i'r'c's'a'v'a'j' 'e'h't' 'o't' 'e's'o'l'c' 'y'l'b'a'k'r'a'm'e'r''''''''''''''''''''''''''''''' 'o't' 'g'n'i'o'g' 'm'''I' '.'e'm'a's' 'e'h't''''h' 't's'o'm'l'a' 's'a'w' 'e'c'n'a'm'r''''o'f'r'e'p'''''''''''''''''''''' 'y'l'n'o''''''''''''''''r'e't's'a'f' 'y'l't'h'g'i'l's'''''''''''''g'i'l'g'''''''''''''f' 'y'l'e'r'a'b' 's'a'w' 't'i' 'd'n'a' 'k'r'a'm'h'c'n'e'b' 'y'l'r'a'e' 'n'a' 'n'a'r' 'I' '.''e'l'u'''r''' 'a' 's'''''e'r'e'h'T'''''''''''''''''s'k'r'a'm'h'c'n'e'b' 'e'b'y'a'M'''' It seems like tests - you can prove the existence of bugs, but not their absence. Benchmarks feel like that too - you can prove speed ups are poss''''''''''''''''''''''''''''''''''so'''s'e'o'd' 'e'g'r'e'm'o't'u'a' 't'a'h'w' 's't'a'h't'ible, but you can't ''*'*'prove something is inherently s'*'lo'*'w.'n'n'''s'i'x'e'''''''''''''''''''''''''''''''''''''''''''''''''''' 'n'o'i't'c'n'u'f' 's'i'h't' 'f'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i't'r'e's'n'i' 'r'o'f' ''''''s'i' 'c'i'g'o'''''''g'i'l''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'a' 's'c'i't'n'a'm'e's''''''''''''''''''''e'r'a' '''s'n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'h't' ','s'r'e'p'a'p' 't'n'e'r'e''''i'f'f'i'd' 'y'r'e'v' 'g'n'i'e'b' 'e't'i'p's'e'D' ''''''''''''''''''''''''''l'a'c'i't'n'e'd'i'''''''''''''''''''''''''t'r'a'p'a' 'l'l'e't' 'o't' 'e'l'b''''l'i's's'o'p'm'i'''''''''a'c'i't'n'e'd'i' 't's'o'm'l'a' 'e'r'''y'e'h'T' '.'k'o'o'l' 'a' 'e'v'a'h'''''''h'a' 'o't' 't'n'a'w' 'u'o'y' 'f'i' ','e'l'i'f' 'e'm'a's' 'e'h't' 'n'i''''''''''''''' 'e'h't''''''''''.'l'a'c'i't'n'e'd''''''e'd'o'c''''''''''s'e's'a'b'e'd'o'c' 'i' 't's'o'm'l'a'''''''''''''''''''t'n'e'r'e'f'f'i'd' 'y'l't'h'g'i'l's' 's'i' 'n'o'i's'r'e'v' 's'j'y' 'e'h'T' '''''''''''h't' 't'u'b' ','s'g'u'b' 'f'o' 'e'c'n'e's'b'a' '''e'h't' 'e'v'o'r'p' 'n'a'c' 'u'o'y' '-' 's't's'e't' 'e'k'i'l' 's'm'''''' 'r'i'e'h'T''e'e's' 't'I' '?'g'n'i'v'o''''''''ode'''''''''''''' i''s '''''''''o''s ob''''i''s obviou'y'''sl''y'It''''''''''''''''e'r'o'm' 'x'0'3' 'd'n'a' ','s not exactly like-for-like -''' ver''y differen''t ''''''''''''''''''f'''''''''''''''' my implementation doesn't''''''''''''' 's'''' use''''''''''''l'a'e'r' '''''''''''y'r'a' examp'''le,''''''''''','e'c'n'a't's'n'i' ''r'b'i'l' 'e'h't' 'e'c'n'e'r'e'f'f'i'd' 'f'o' 's't'o'l' 's'a'h''''''''''''''''''''''''''''''''''''''''''''''''''''.''*'F'*'''''e'g'r''''''''''''e'c'n'e''''''''''''''''''e'l'p'm'i's' 'd'n'a' 't'e''''e'h't'e'w's'''''e'r''''''''''''''t's'u'j'''''''''''''''''''''''p'u' 's'g'n'i'h't' 'g'n'i''W'''''''''''w''' 't'a'h'''''''''''' 'd''' ''n'a' ''''w'o'n' ''n'a'e'l'c'''''''t's'a'f' 'a''t' 'w'o'N'm'm'u'g' '''''''''''''s'j'e'l'b'a't'u'm'm'i' 'm'o'r'f' 'y''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'n'a' ','e'd'o'c' 's's'e'l' 's'e't'u'c'e'x'e' 'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''''''''''''''x'e' 'e'd'o'c' 'y'M'''s'n'o'i't'a'z'i'm'i't'p'o'o'r'c'i'm' 'e'l't't'i'l' '''' 'l'b'a'b'o'r'p'''''''''''''''''''''''''' 'o't' 'e'u'd' '''''''''''''' 'f'o' 's'k'r'i'u'q' 't's''.''''' ','h'O'u'j' 'y'l'b'a'b'o'r'p'''e'h' '''''''r'''''''''''''''''''''''''''''''''''''''''''''''''''''''')'s'j'e'l'b'a't'u'm'm'i' 'd'n'a'(' '''''''s'n'o'i't'a't'n'e'm'e'l'p'm'i'''''''m'i' ''''''''' 'f'o' 'k'c'a'l' 's'''e'g'r'e'm'o't'u'a' 't's'u'j' 's'i'''''''''''''''y'l'b'a'b'o'r'p' 'n'a'c''''''''''''''''''''''''''''o't' 'e'l'b'''''''e'n'o'l'a' 'a'''''''t'a't'u'b'i'r't't'a' 'y'l'b'a'b'o'r'p' 's'i'''''''e'l'p'm'''''''''' 'g'n'i'e'b'''''w'o'l's''''t's'u'j' ''i's''e'p'u's' ''''''''g''''''' 'f'o' 'l'''''''e'd'o'''''''''''''''n'w'o'd' ''''''''''w'o'd''c' 's''''l'a'''''''''''''''w'o'l's' ''''' 'g'n'i'h''''''''''''''''''r'e'w'o'l's' 's'e'o'd' ''t'y'r'e'v'e''n'i'k'a'm' '''r''''''e'e'f'f'i'd' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '.'e'r'u't'c'u''''''''''''''e'c'n'a'm'r'o'f'r'e'p' ''r't's' 'a't'a'd''''''''''''''e'g'r'e'm'o't'u'a' 'r'o'f' '' 't'e'e'w's' ''' ''s''''''''''''''''''''''s'k'r'o'w' 'e''''''''''e'k'r'o'w'e' 'h't' 'p'u' 'g'n'i'm'm'u'g' 'i'h't' 'o't' 't'a'h't' 'f'o' 'l'l'a' 'e't'u'b'i'r't't'a' '''''''''''''''''''''''h'c'a'o'r'p'p'a' 's'''n'i'v'e'K' 'e'v'i'g'''''''''''''''''a' 't'A'''''''''''''''''''''''t' 'e'r'a''''s' 's'r'e'b'm'u''' ''''''n' 'e'h'T''''''s'e'k'a't' ''''''''' 'a''''''''''''''''y'r'''''s'e'k''''r'a't''''''''s'i' 's'i'h'T''e'v''''''''''''''''''''t'r'''a'e'h'''''''''''''''''''t'r'a'e'h' 'r''''''''''''s'e'k'a't' 't'i' 'u'o'y' 'f'o' 't'a'e'b' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'k'i'l' 'e'b' 'd'l'u'o''''''t'''u'B' '.'''w'''''''''''''''''''''''''''''''.'h't'e'e't' '''r'u'o'y' 'h's'u'r'b' 'o't' 'n'e'k'a't' 'e'm'i't'''''''''''y'l'l'a'u't'c'a' ':''''''''' 's'i'''''''''y'l'l'a'u't'c'a'' 'e'h't' 'd'n''''''''''''''''''' 'h'c'u'o'c' 'e'h't' 'r'e'd'n'''U'a' ','t'a'e'b' 't'''r'''a'e''''''''''''''k''''''''''''''''s'i'h't' 'x'i'f' 'n'a'c' 'e'W' '''' ''''''''''''' 'e'W' ''r'o'w' 'f'o' 't'o'''''''''''''''''''''''''''''''''''''''''' 'y'm' 'f'o'''''''''''''''''''''''''''''e'w' 'g'n'i'h't'y'r'e'v'e' 's'u'''''''e'm'''''s'u' 'l'l'e't''''n'o'c' 'd'l'u'o'w'''''''''''e'm' 's'l'l'e't' ' 'd'a'e''''''''w'o'n'k' 'o't' ''r' 'e'l'g'n'i's' 'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'L'')'d'e'e'n' '''I' 'n'o'i't'a'm'r'o'f'n'i' '''''''''''''''''''''''''''n'o's'a'e'r' 's'i'h't' 'y'l't'c'a'x'e''''''''''''''''''''''' 'a''''''''''''''''''''t''''''''''''''''''''''''''''''''''''''''''''''''''' 't'u'b' ','g'n'i't'i'd'e'''''''''''''''''''o'o't' 's'e's'a'c' 'r'e'h't'o' 'n'i' ''''d'e'e'n''''' 't'x'e't' 'n'e'h'w'''''''''''''''u'c'o'd' 't'x'e't' 'a' 'n'i' 'h'c'u'm''''''''''m'u'n' 'n'''' 'e'p'p'a'h' 't'''n's'e'o'd' 's'i'h'T's'o'c' '''''e'c'n'a'm'r'o'f'r'e'p' 'r'a'e'n'i'l' 's'a'h' 's'j'y' 'n'i' 'h'c'i'h'w' ',''''And '''''''''''n'o's'a'e'r' 's'i'h't' 'r'o'f' 'e'h't' 'l'l'a' 's'a'h' 't'i' ','t's'i'l' 'y'r'e'c'o'r'g' 'y'm' 'p'u' 'k'c'i'p' 'I' 'n'e'h'w' 'o'S'('''''''''''''''''''''''''''''''''g'n'i't'i'd'e'''''''''''m'a''''m'r'g'o'r'p' 'e'h't'' 't'x'e't' 'n'a'h't' 'r'e'h't'o' 's'g'n'i'h't''''h' ''' ''''''' 'f'o' 't'o'a'l' 'a'h' 'e'''''''''''''''''''' 'g'n'i'o'd' 's'e'k'''a'm' 's'i'h't''''''''''''''''''''''''''''''''''''''''''''''.'e'r'o'h'c' 'a' 'e'b' 'l'l'i'w' 'g'n'i'p'p'o'h's' 'y'r'e'c'o'r'g' 'e'h't' 'g'n'i'o'd'''''''''''''' 'e''''o'h't' 'o't' 'g'n'i'o'g'l'g'n'i's' 'a' 'n'e'e'w't'e'b' 'e'c'n'e'r'e'f'f'i'd' 'e'h't''''''''''''''''''''''s'i''''''''l'o'v'n'i''''''''''s'e'b'i'r'c's'e'd' 't's'i'l' 'g'n'i'p'p'o'h's' 'r'u'o'y''''''''''''''''''''r'u'o'y' 't'u'o' 'g'n'i'r'u'g'i'f' 's'''' 't'I''''''''''''''''''''''''''''''''' 's'e'c'a'l'p''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n''''''''''y'l'l'a'u't'c'a' 'i'n'o'i't'n'e'm''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'y'u'b'''''''y'u' 'o't' 't'a'h'w' 't'u'o' 'e'r'u'g'i'f'''' 'o'g' '''' 'o't' 'e'm'i't' 'g'n'o'l' 'a' 'u'o'y' 'e'k'a't' 'o't' 'g'n'i'o'g' 's't'i'''''''''''''''''''''r'u'o'y' 'h'g'u'o'r'h't' ''''''''''''''''''''.'e't's'a'p'h't'o'o't' 'd'e'e'n' 'u'o'y' 'g'n'i'y'a's' 'e't'o'n' 'e'l't't'i'l' 'a' 's'i' 'e'g'd'i'r'f' 'r'u'o'y' 'f'o' 'p'o't' 'n'O''''''''''''''''' 'o't' 'e'v'a'h' 'u'o'y' 'd'n'A''''.'n'o' 'o's' 'd'n'a' ','''e'g'd'i'r'f''''r' 'e'h't' 'f'o' 'p'o't' 'n'O''' ','''h'c'u'o'c' 'e'h't' 'r'e'd'n'U''' '-' '' 'f'o' 't's'i'l' 'a' 'e'v'a'h' 't's'u'j' 'u'o'Y'''T' ''''''''''''''s'e'r'i'u'q'e'r' 't's'r'i'f''e''a' '' '''d'n'A''' ''''''''t'h'g'i'm'''''''' 'c' ''.'l'''l'u'f' 'e'k'a't' 'd'l'u'o'''''''''''''''''e'l'a'c's' 'n'a'm'u'h' 'o't' '''''''''''''''''''''''''''''''''' 'e'n'i'g'a'm'i' 'n'a'c' 'e'w'''''''''''''''''!'.''''''!'*'e'g'r'e'm'o't'u'a' 'n'a'h't' 'r'e't's'a'f' 'x'0'0':''3'*' '''s't'I' '.''''c' 'I' 'h's'i'w' 'I''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a't'a'd' 'e'h't' 't'u'o'b'a' ''''''' '.''v'(''''''s'i'h''')''t' 'm'o'r'f' 'e'd'u'l'c'n'o'c' 'n'a'c' 'e'w' 'h'c'u'm' 'o's' 'y'l'n'o' 's'''e'r'e'h't' 'd'n'i'm' 'n'i' 'r'a'e'b' '' (v13.''5.5)''''''''''5'''''''''''''''''''.'5'.'3'1' '@' 't'u'B'(''''('''''''''''''''''''''''''''''''''''''''''''''''''''''n'.'s'j'e'l'b'a't'u'm'm'i' 's'i' 'y'l'l'a'e'r' 'e'c'n'e'r'e'f'f'i'd' 't'a'h't' 'f'o' 't'o'l' 'a' 't'u'B'n'''''''''g'n'i's'u' 't'o'n' 'm'''I' 'e'm'o't'u'a' 'm'o'r'f' 't'n'e'r'e'f'f'i'd' 'y'r'e'v''' 'y'l''''y's'u'o'i'v'b'o' 's'i''''''''''''''''b'o' 's'o' 'e's'a'b''''' 's'i' 'e'd'o'c' 'y''''''''''e'd'o'M''''''''''''''''''''''''''''''''''''''t'''n'o'd' 's'r'e's'u' 'r'e'v'e'n'e'h'w'''''''h'e''''''' 'l'i't'n'u' 'e'b' 'l'l'i'w' 't'i' 'd'n'A'(' ''r'p''''''''''''g'n'i'w'o'h's' 'y'l'l'a'u't'c'a''' 'I' 'd'n'A'n'n'''' '.'y'd'o'b'o'n' 's'a'w' 'I' ''''i'c''''''''''''''''c'e'n'c'i's' 'r'e't'u'p'm'o'c'''''''''''''''e'l'p'o'e'p' 'e'c'n'e'i'c's' 't'r'a'm's' 'e'h't' 'f'o' 'e'n'o'n''''''''''''''' 'y'l'l'a'e'r''''''''''''''''''.'t'a'h't''''''.'t'a't'h' 't'u'o'b'a' 'd'e'r'a'c' 'y'd'o'b'o'n' 'e'k'i'l' 't'l'e'f' 't'i''''I'''''o'b'o'n' '''''''''' '-' 't'u'b' 'e'd'o'c' 'g'n'i'k'r'o'w'''''' 'e'm'o's' 'd'a'h' 'I' 's' 'k'r'a'm'h'c'n'e'b''''''d''''e'e'p's' 'e's'e'h't' 't'a''''''''''y'd'o'b'y'r'e'v'e' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''('''''''''''''''''''')'.'.'''.'e''''''m'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'g'n'i'k'r'o'w' 't'i'g' 'n'i' 'n'o'i's'r'e'v' 'e'h't' 't'e'g' 't'''n'd'l'u'o'c' 'I''''''''''' 't'''n'e'v'a'h' 'I' 't'u'b' ','r'e't's'a'f' 'x'5' 't'u'o'''*'*'b'''''''''*''a'*'' 's't'i' 'd'l'o't' 'n'e'e'b' 'e'v'''I' ''d'o'c' 'g'n'i'k'r'o'w' 't's'u'J' '.'s'm'i'a'l'c' 'y'm' 'g'n'i'y'f'i't's'u'j' 'r'e'p'a'p' 'd'e'h's'i'l'b'u'p'''''''''''' 'c'i'f'i't'n'e'i'c's' 'a' 'e'v'a'h' 't'''n'd'i'd' 'I' '.''''''' ';''''''' ','y'd'o'b'o'n' 's'a'w' '''''''''''''''' 'a' 'e'v'a'h' 't'''n'd'i'd' 'I' 't'u'b' '-' ''''-'h't''')'y'l'd'e't'''''''''''''''''''''t'u'o'W''b'a' 'k'n'i'h't' 'I' 't'a'h'w''n'i'o'p'(' ''g'n'i'd'n'e's' flipping me a link to the paper and asking me about it. Because, written up as Published Science Paper it makes peop'N''o'o'''''''n'''''''''''''l'a'e'r'''''''''''''''''''''''''''''''''''''!'e'm' 'e'v'e'i'l'e'b' 'e's'a'e'l'P' '!'t'h'g'i'r''''''''''''''''''m'''I' '!'l'a'e''''''''''' 'n'a'c' 'e'w' 'd'n'A''r' 't'''n's'i' 'e'c'n'e'i'c's' 'e'h'T''''''''i'c's' 'e'h't' ''' ''','o'S'le think this is a Fact Of The Un''n'i'iverse rather than an implementation detail'''''''''''''''''''''''''''''''''''''''''''''''''.'n''r'e'h'c'r'a'e's'e'r' 'd'e'k'r'o'w'r'e'v'o' 'n'''' 'a' 'y'b' 'n'e't''''e't'i'r'w' 'e'd'o'c' 'e'm'o's' 'f'o'''''''''''' 'e'm'o's' 'n'i' of so'''''''''''''''''''n'o'o's' 'e'e's' 'l'l'''e'w' 's'a' ','m'n'''e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'l'p'm'I''''''''''k'a'M'''''''''''''s'T'D'R'C' 'g'n'i'k'a'M''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''w''' ','e's'u'a'c'e'B''''''''''e'B'?''Written up as Publ''ished S''''''''''''''''''''''''''''''''t'n'e''''n'e'r'e'f'f'i'd' 'd'n'A'n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'm'o's' 'f'o' 'l'i'a't'e'd' 'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''''''e'''''''''n'e'e''''g'n'i'''b''' 'e'v'''d'a'c'e'd' 'a'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'l'b''''''''''''''''''' 'd'n'a' 'e't'o'r'w''''''''e't'o'r'w'e'r''' 'e'h'd'n'a' ' run''''-' ''''''''''''''''a' 's'a'w' 'e'r'e'h't' 'f'I'a'k'''''''''t'i'm'd'a' 'o't' ''r''''r'o'w'n'u' 'd'n'a' 'w'o'l's' 'e'b' 's'''''''''''''''''''''''''''''''''''''''''' 'e'h't'''''''''''''''''''''''''''''''''''''''n'i'v'e'''''''v'E'K' 'e'r'o'd'a' 'd'l'u'o'w' 'y'e'h't''''''''''''''''''''''''''''''''''''.'n'o' 's'l'l'e'b' 'h't'i'w' 'e'r'e'h't' 'e'b' 'd'l'u'o'w' 'n'i'v'e'K' ','y't'i'n'u'm'm'o'c' '''''''''g'n'i'n'n'u'r'd'e'e'p's' 'f'o' 'n'o'i's'r'e'v' 'r'e'm'm'a'r'g'o'r'p''''''''''''' 'g'n'i'm'm'a'r'g'o'r'p' 'a' 's'a'w' 'e'r'e'h't' 'f'I' ''y'a'w'l'a' 'o't' 'd'e'm'o'o'd' 'e'r'e'w' 'y'e'h't' 't'a'h'T' '.'s'T'D'R'C''''e'd' 'n'o'i't'a'n't'e'm'e'l'p'm'i' 'n'''' 'a' 'n'a'h't' 'r'e'h't'a'r' 'e's'r'e'v'i'n'U' 'e'h'T' 'f'O''''''''''''''' 'a' 'n'a'h't' 'r'e'h't'a'r' 't'c'a'F' 'a' 's'i' 'c'''''''''''''e'd'o'c' 's'i'h't' 'f'o' 'ience Paper it makes people think thisn' '''''' 'e's'u'a'c'e'b'n'o' 'g'n'''''''''''''''''w' 'r'e'p'a'p' 'r'i'e'h't' 'n'I'''''''''''''''''w''' 't'u'o' 's'n'r'u't' '''t'I'i'o'g''''' 's'a'w' 't'a'h'w' 'e'e's' 'o't' 'r'e'p'a'p' 'e'h't' 't'a''''''''['''''''''''''''''''''e'r'e'h' '''(https://josephg.com/blog/crdts-are-the-future/''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'e'y' 't'a'h'''''''''''''''''''''''''''''''''' 's'r'e'''''''''''''''''''n'i' 'n'o'i't'c'n'u'f' 't'r'e's'n'i'p'a'p' 'c'i''''''''''''''')'A'T'A'Y'(' 'T'D'R'C'''''''R'c' '''' 's'''m'e'd'a'c'a' 'n'i' 't'u'o'b'a' 'd'a'e'r' 'u'o'y''''''''' 'y'a'd'o't''t' 't'u'o'b'a' 'k'l'a't' 'o't' 'y'd'a'e'r' 't'o'n' 'm'''I' 't'u'b' '-' 'e'r'a'w't'f'o's' 'r'u'o' 'l'l'a'''''''''''''''''''f'o's''''f' 'f'o' 's'd'n'i'k' 'r'e'h't'o' 'e'b'y'a'm' 'd'n'A' '.')')'(']''y'h's'i'f' 's'a'w' 'g'n'i'h't'e'm'o's' '-' ''''''''''''''''''''''''''''''''''''''''p'''p''''''''''''''''''''''''''''''''''''''''''n''''t'n'e'm'e'l'p'm'i' ''''''''''''s''''''''''r'i'e'h't''''''''''''''''r'a''''''''''''''''''''''''' 'd'e'h's'i'l'''''''''''''''''''''''''''s'i'h't' 'k'n'i'h't' 'e'l'''''''''''''''''''n'n'a'm'p'p'e'l'K' 'n'i't'r'a'M' '''' ''p'o'e'p' 's'e'k'a'm' 't'i' ''b'u'''''''''''''i'l'b'U'P'''''''b'u''''''''''''''r'e'p'a'P' 'e'c'n'e'i'c'S' 's'a'''''''''''''''''''''''''''''''''''''''''''''''s't'e's'l'l'i'k's' 't'n'e'r'e'f'f'i'd' 'h't'i'w' 'e'l'p'o'e'p' 'e'v'l'o'v'n'i' '''''''''''''''''''e'b' 'e'r''''' '''p'u'''''' 'a' 'n'i' 'n'e't't'i'r'W' ''l'u'c'i't'r'a'p' 's'i'h't''''''''''''''''''''n'o'i't'a't'n'e'm'e'l'p'm'i' '''''''''''''')'s'm'h't'i'r'o'g'l'a' ''''''' 'f'''o' 'l'l'a''T''''''''''y'l't'n'e'r'r'u'c' ''O' 'd'n'a' 'T'D'R'C' 'h't'i'''''d'r'a'w'w'(' ''d'l'u'o'c' ''''t'u'''''''''' 't'a'h't' 'e'k'i'l''''''''' 'd'''''u'o'y' '''l'u'o'w''B'u'o'''''''''''''' 'o't' 'd'e'e'n' 'e'w'y' 's''''''''''''''''''''''''''''''''''''''''''''''''''y'r'o'm'e''''a'm' 'n'i'a'm' 'o't' 'd'''''''''''''''''''''''''''''''''''''''''''''d'l'u'o'w' 'e'w' 'e'b'y'a'm''''''''''''''''''''''''s'i' 'h'c'i'h'w'''''' ''''r'e'p'''r'o' ','s'm'3'2' 'n''''''e'm'o'h' 'i' 's'n'o'i't'a''''''s''''''''''''''e'v'a'h'''''''''''''e'v'h'a' 'l'l'i't's' 'd'''I''t'''i'd'e'r'e'p'o' '0'0'0' '0'6'2' 'g'n'i's's'e'c'o'r'p' 'e'r'''e'W' '''''''''''''''''''''''' 'l'l'u'f'''''''''''''''''' 'k'r'a'm'h'c'n'e'b'''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''!'p'u' ''''''' 'u'd'd'a' 't'''n'o'd''' 's'r'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e'v'a'e'l'r'e't'n'i' 'e'r'a' 's'e't'a'd'p'u' 'e'e'r't'-'b'''p'u' 'e'h't' 'l'l'a' 'e's'u'a'c'e'b' ','g'n'i'h's'a'r'h't' ''b'm'u'n' 'e's'o'''h't' 't'u'B','''f'o' 'e'c'a'r't' 'g'n'i't'i'd'e' 'n'a''''''' 'a''''''''''''''''''''''''''''''r' ''e's'u' 'e'l'g'n'i's' 'a' 'm'o'r'f' ''''''''''''''''''S' '.'s'n'o'i't'a'r'e'p'o' '0'0'0' '0'6''''7'2' 's's'e'c'o'r'p' 'o't' 's'''''''s' 'e'k'a't' 't'i' 'e'm'i't' 'h'c'u'm' 'w'o'h' 'e'b'i'r'c's'e'd' 's'r'e'b'm'u'n''''t' 'e'c'n'a'm''''a'r'o'f'r'e'p' 'e's'e'h't' ','r'e'b'm'e'm'e'R' ''a'e'''''''e'a'r' 'h'c'a'e' 'h't'i'w' 'e'l'b'i's's'o'p' 's'':'a' 'h'c'u''' '''':''''m' 's'a''''''''''o'y' 'y'a'w'''''''''''''''e'l'p'm'i's' ''''s''''''''s''''''''t'o'l' 'a' ''m'''h't'i'r'o'g'' '''l'''n'n'''''a'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.''''''''''''''''''''''''''''''''''''' '''y'b' 'd'e's'u'a'c' '''''''''''''g'''''''''''''''''' 't'h'g'i'r'''''''''''''t'i'r'w' 'm'''I' 'f'I'''''l''' 't'I'n'i'h't'e'm'o's' 'r'o' ''''y'l'b'a'b'o'r'p' 's'i''''''''''''''''''''''''''''''''y'a'w' 'e'h't' 'l'l'a' 'e'c'n'a'm'r'o'f'r'e'p' ''''''''r'e'p' 'y'm' 'e'c'n'e'r'e'f'f'i'd' 'e'h'T''''t'o'n' 's't'i' 't'u'B' '.')'s'm'3'2'(' 'e'e'r't'-'b' 'y'm' 'g'n'i'''' 't'a'd'p'u'''' 'n'i' 't'n'e'p's' 'e'm'i't' 'e'h't' '+' ')'s'm'9'2'(' 'y'e'p'o'r' 'n'i' 't'n'e'p's' 'e'm'i't' 'e'h't' 'f'o' 'm'u's' 'e'h't' 'e'b' 'd'l'u'o'h's'''''''' 'e'h't' 's'i' ')'s'm'5'6'(' 'e'c'n'a'm'r'o'f'r'e'p' 't's'u'r' 'e'h'T'''''''''''''''''''''''s'e'i'r't'n'e'''''''''''''''''''''''''' 'n'o'i't'a't'''''''t'e'n'e'm'''''''m'e'e'l'p'm'i' 't's'u'r' 'e'h'T' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'u''+'''''''''''''''n'a'h't' 's's'e'l' ''''''' 's's'i'''b' '-' 'e'c'n'a'm'r'o'f'r'e'p' 't's'u'r' 'r'u'o' 'o't' 'p'u' 'd'd'a' 'd'l'u'o'h's' 's'w'o'r' 'o'w't' 'm'o't't'o'b' 'e'h'T''''''''''''''''d'd'a' 'd'l'u'o'h's' 'y'e'h'T' '''''''t'''''''t'n''o't''n'a'w' 'I' '' '.'.' 't'u'b' 'd'' 'r'a'w'k'w''''t'i' 'a' '''s'''''''i' 's'i'h't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'''' ''''''' '''''''''!'s'e'k'''''''''''''''''''''''''''' ','y'a'w' 'e'h't' 'y'b' ','h'c'i'h'w'''''''m''' ''''''','n'a'e'm' 'I'''''''''''''''''''''''''''?'e'r'e'h' ''''?'n'o' 'g'n'i'o'g' 's't'a'h'w' '-' ''''!'i'O's'a'w' 't'i''''e'd'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'o't' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c''''c' 't'r'o'p'p'u's' 'o't' 'k'r'o'w' 'a'r't'x'e' 'f'o' 't'o'l' 'e'l'o'h'w' 'a'''''''''' 'e'r'o'm' 'y'a'w' 'g'n'i'o'd' 's't'i' 'd'n'a' ','y'l't'c'e'r'i'd' ''!''''''o'''''c'''' ','l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''s''''''''''')'!'(' '.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'')'n'o'i's'r'e'v' 'e'v'i't'a'n' 'e''''s'y'a's'''''''''''''''''''''''''''''s'm'''h't'i'r'o'g'l'a' 'T'O' 'd'n'a' 's'T'D'R'C' 'd'i'a's''''h't' 's'''a' 'e'm'a's' 'e'h't' 'e'b' 'd'l'u'o'h's' 't'I' '.'e'g'a's'u' 'y'r'o'm'e'm' 'm's'a'w''''''''''''''''' 'n'i'''''''''''''''''''''''''''''''''''''''' 'f'o' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h't' 'h't'i'w' 'e't'e'p'm'o'c' 'n'a'c' 'e'w''' 'e'''''''*''''''g''guessing''''''''s'e's's'e'u'g'a's'u' 'y'r'o'm'e'm' 'e'r'u's'a'e'''''''*'''m' 'o''''t' 'w'o'h' 'a'e'd'i' 'o'n' 'e'v'a'h' 'I'('n''n'n''''''''''''''''d''n'''n''''e'v''''''d'n'u'o'r'a''o'r'p'm'i' 't'''n's'a'h''''''''''s'h'a' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'i' 'p'u'''''*''''''''''*''.'g'n'i'h't'y'n'a' 'n''''''' 's'i' 's'i'h't' '''''''''''''''''''''''''''e'r'''y'e'h't' ','d'r'a'g'e'r' 't'a'h't' 'n'i' 'd'n'A''e'd''''''''''t' 'e'o'c''''d' 'n'a'c' 'e'W' '.'s'y'a'd' 'e's'e'h't' ''''''''''''''''''''''' 'e'W' 'e'''''''''''''''''''''''''o't''''''''''''''''''''''''' 'y'l'e'd'u'r'''''''''''','''t''' ''a' 'd'e'h'g'u'a'l' 's'e'm'i't'e'm'o's' 'g'n'i'e'b'' 'l'''a'c'i't'n'e'd'i' 't''''''''''i't' 's'o'm'l'a' 's'i'c'n'a'''''''t's'o'm'''''''o's'E''l'a' ''m'r'o'f'r'e'p' 's't'i''' 'e's''v'o'r'p'm'i' 'o't' 'e'l'b'a' 'n'e'e'b''''''''''''''''.''''''''''''''''''''''''''''' 'g'n'i'h't'y'n'a' 'd'n'i'f''''i'u'q' 'n'a'c' 'e'w' 'o's''''w' ','''''''''''''''''''''''''''''' '''h'''t'r'a'e' 'n'o'''''''''''''''''I took a closer '''''''d'n'''''''''''''''''s't'r'e's'n'i' 'e's'o'h't' 'f'o'A' ''''''''o''' '-' 'h'u'D''O'.'look and it seemed like it w'''' 'u'o'''''''''s'e'm'i't'e'm'o's''y'''''''''''''''''t'n'e'm'u'c'o'd' 'e''''':''''e'''''''d'''e' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'a' 'e't'o'r'w' '''''''''''''''''''''''''''''''''''''''''''''''''e't'o'r'w'''''''w' 'y'e'h't' 't'u'B''O' '.')'s'l'a'c'i's'u'm' 's'u'o'm'a'f' 'f'o' 'h'c'n'u'b' 'a' 'e'd'a'm' 'y'e'h't'''''''''''''''''''r'o'f' 's'u'o'm'a'f' 'e'r'''y'e'h't''''t'(''''''''y'd'o'b''o'd''''' 't'a' 's't'n'u'o'c''''''''''n'u'o' 'r'e't'c'a'r'a'h'c' 'e'h't'''''''''r'e't'f'a' ''''''''''''e'h't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'W''''y'a'w'y'n'a' 'o'o't' 't's'a'f' 't'a'h't' 'e'd'a'm' 'I' 't'u'''' 'g'e'b' ''','t's'e't' 's'i'h't' 'n'i' 's'r'e''''*'*'''''' 'e'l't't'i'l''''''''''''''''''*'*'''''''''''''' '!'c'i'n'o'r'i' 'w'o'''!'?'''H''Who could have guessed!''''''''!'c'i'n'o'r'I'''''' 'e'e'r't'-''*'*''b' 'e'h't''''''''''*''''*''e'''p' 'e't'o'''''''''''''.'D'I' 'y'b' 'h'c'r'a'e's''m'e'r'''''''''''''''-''''''t's'u'j' ' 'p'l'e'h' ''*'*''t'h'g'i'm' 't'I'' 'm'o'r'f'''''''''*'' '*''s't'i'd'e' 'e'g'r'e'm' 'r'e'v'e'n' 'e'W''It doesn't come into play here, but w''''W'''a''''S''''A' ''t'o'o'r' 'e''''''''''''''''o'o'r'e' 'h't' 'o't' 'p'u' 'y'a'w' 'e'h't' 'l'l'a' ','t'n'e'r'a'p' 's't'i' 'd'n'a' ','t'n'e'r'a'p' 's't'i' 'n'e'h't' ','f'a'e'l' 'a' 'e't'a'd'p'u' 'e'W' 'h't' 'o't'n'i''as amateur'''''''''''''''''''''''''''''''k'n'''''''''''''''''''''''''''''')'s'r'''''''''''''''''''''''''''''''''''''''' 'e'l'o'h'w''''''''''''''''''''''''''''''''''s'e'z'i's' ''''''''k'r'o'w'''''l'l'e'w' '' 'o't' ''t'n'e'r'e''''''''''''y'l'l'i's' '''''''''''''''''''''''''''''''''''''d'e'i'r't'''''''''''''''''f'o'''''''''''''''''''w'o'l's' 'y't't'e'r'p' 'e'r'a' ' 's't'o'l' 't'a'h't'''''''''''''''''''''''''''''' 'w'o'h' 'l'l'a' 's'u' 'l'l'e't' 'o't' 'd'e't'r'o'p'o'P''''r'p''S''''''''''''''''''''''i'''''''''''''''''''''.'W''*'''*'''g'n'o'r'w' 's'a'w' 'r'e'p'''''''r'e'*''a'p'''''*'a' 'e'h't' '''' '''''''''''''''''''''''''''''''''''a' ''''''''''''''''''e'k'i'l' ''''''''''''''''''''''''''g'n'o'r'w' 'f'o' 'd'n'i'k' '''''''s''T'g'n'i'r't's' 'e'v'i't'a'n' 'g'n'i's'u' 'e'r'e'w' 'u'o'y' 'k'n'i'h't' 'd'''u'o'y' 't's'a'f' 'o's' 'n'u'r'''t'u'B' It turns out we c'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'i' '''s'*''t''*'I''e'k'a't's'i'm' 'r'i'e'h'T''''s't'I' '.'w'o'n' 'r'e'p''*'a'p'''''''''''e'r'''y'e'h'T' '.'*' 't'a'h't' 'e't'a'i'c'e'r'p'p'a' 'f'o' 't'r'o's' '''''''''''' 'f'o' 't'r'o's' 'm'''I' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''o'S'n'''''''e'l'p'o'e'p' ''''o'i't'a'r'e'p'o' '''''''''''''''r'e'p'a'p' 't'a'h't' '''''''''''e'r''database'''''' 'g'n'i's'u' '''e'w''''''g'n'o''' ''r'w' 'y'e'h'T''''n'i' 'g'n'i'r't's' 'e'v'i't'a'n' 's'a' '''''t'a'h'w' ''t's'a'f' 's'a''''''''''''''*'''''''''''*'''''''''''' 'o't' 'm'e'e'''s''''''k'n'i'h't' 'e'l'p'o'e'p' 'e'm'o's' 't'a'h'w'''''e'm'o's'''''''''''''''''''''''' ','d'l'o't' 'n'e'e'b' 'e'v'''I' 't'a'h'w' 'e't'i'p's'e'd'' 't'u'o'b'a' 'm'e'h't' 'e'k'a'm' 'n'a'c' 'e'W' '.'''''''''t'u'o'b'a''''k'i'l' '-' 't's'a'f' 'y'z'a'r'c' 'm'e'h't' 'e'k'a'm' 'n'a'c' 'e'W' '.'t's'a'f'an make CRDTs work almost as fast as editing a string. '''l''''l'l'e't''''''''e'l'p'o'e'p' ' 'o't' 'd'e'm'i'a'l'c''''''''''''[''l'l'a' 's'u' 'd'''https://en.wikipedia.org/wiki/Gilbert_and_Sulliva')'n'(']'''''''r'e'p'a'p'l'o't''''''''''''''''''''''''''''''''''''''''''''''''''s'i' 'h't'u'r't' '''''''''''''a' 's'd'e'e'n'''''''''''''''''''''''m'a'e'r'd' 't'a'h't' ''''''''''''''''''''''d'e'v'e'i'h'c'a' 'e'b' ''''b'''''''''''''''''''''''''''''''y'e'h't' 'n'e'h'w' 't's'L'''''t''''l'a' 'e'b' 'k'''''''''''''''''''''''''''''''''''''''''''''''s'c'i'r'y'l' 'e'h't' ''''''''''''''''''''''''''''''''''''''''''''''''''''''r''''''''''''''''a' 'd'e'r''''''''' 'd'e'd'e'e'n''a'h''''''e'b' 'o't' ''s' '''y'e'h'T'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.''E'e''''g'n'o'l'a' 'e'k'a'm' 'd'l'u'o'c' 'm'e'h't' 'f'o''' '''e'n'o'''''''o'n' 'o'n' 'g'n''And yet''''t'u'B'i'h't'e'm'o's' 'e'd'a'm' 'y'e'h't' 'r'e'h't'e'g'o'T' '.'t'i' ''''e'n'i'g'n'e' 'e'h't' 'r'e'h't'o' 'e'h't' ','r'e'l'l'e't'y'r'o't's' 'e'h't' 's'a'w' 'y'u'g' 'e'''' 'n'o' '-' ''r'e'h't'o' 'e'h't' ','c'i's'u'm' 'e'h't' 'd'i'd' 'y'u'g' 'e'n'o' '-' 'r'o'w' 'n'a'c' 's'n'o'i't'a'r'o'b'a'l'l'o'c' 'e's'o'h't' 'd'n'A' '.''''''''''''''''''''''''!'d'e's's'e'u'g' 'e'v'a'h' 'd'l'u'o'c' 'o'h'W' '''' 'k'r'o'w' ''e'h't' 't'u'B''And sometimes the best collaborations aren't between peers. Instead they look like Gilbert & Sullivan. Or Jobs and Wozniak. The same love, and the same dream but totally different skill sets brought together brought together to achieve something no one of us could achieve on our own.''nn'n''''''''''''l'l'e'w' 'y't't'e'r'p' '''''''''''''''''' 'd'n'a' 'r'e't's'a'f'''''''''''''''''''''''''''''''.''''d'n'A'''''''''''''''''''' 't'a'h'w' 'r'e't't'a'm''them'''s'u' 'o'n' ',''''.'k'o' 's't'a'h't' 'd'n'A' '''' ''''''''''''''''''''''' 'a' ''.''''''''''''''''''''''' 'y'l'l'a'n'i'f' ''''''' 's'a'w''' 'r'e'p'a'p' 't'a'h't' 'o'S''''''g''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'n'o' 'o'n''''''''''''''''''''''''''''''''''''''n'w'o' 'r'u'o' 'n'o' 'e'v'e'i'h'c'a' 'd'l'u'o'c' 's'u' 'f'o' 'e'n'o'n' 'g'n'i'h't'e'm'o's' 'e'v'e'i'h'c'a' 'o't' 'r'e'h't'e'g'o't' 't'h'g'u'o'r'b' 'r'e'h't'e'g'o't' 't'h'g'u'o'r'b' ''n'i't'i'd'e'''''''''g'n'i'r't's' 'a' 's'a' 't's'a'f' 's'a' 't's'o'm'l'a' 'k'r'o'w'''''f' 's'a' ''''''''''''' 't's''''''''''''''''''''''''''''''''''''''''''''''t'''''t'a'h'T''''''''''''''''''''''''''t'n'e'm'o'm' 't'a'h't' 'n'i' 'd'n'A' ''''''''''''''''''''a'c'a' 't'a'h't' 's'n'''''''s'k'a'''''''''''''''''''' ''''m''''h'g''t'a''u'o'h't' 'n',''''''e'v'e' ','t'u'B'''e''''a'm' 't'a'h'''''t'e'y' 't' 'd'n'A'i' 't'u'o'b'a''''''''''''''''''''''''''''''','d'e't'n'''''n'e'v'e' ''a'w'''''''''''.'p'l'e'h' 'o't' '' 'y'l'l'a'e'r' 'I' 'k's'a't' 'a' 'h't'i'w' '' '''''''''''' 'y'r't' 't'''n'd'i'd'r'''''''''''''''''''''''''''''.'t''Oops''''''''''''''''c''' 't'u'o' 'd'e'n'r'u't' ''''''' 'e'b''''''' 'e' 'o't't'I' '!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''''u' 'f'o' 'l'l'a' 'n'e'e'w't'e'b' ''.'n'o'i't'a'r'o'b'a'l'l'o'c' 'a' 'd'e'd'e'e'n' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'C' ''i' 'o't' 's'r'e'h'c'r'a'e's'e'r' 'e'h't' 't'f'e'l' 'I''''e'v'e'l'c' 't'i'b' 'a' 'e'b' 'o't' 'g'n'i'l'l'i'w' 'e'r'''e'w' 'f'i' ',''a'f' 'd'n'a' 'l'l'a'm's''''''''''''''''''a' 'h'c'i'h'w' '''''''''.'s'T'D'R'C' 't's'a'f' 'e'k'a'm' 'n''''h'a'c' 'e'w' 't'u'o' 's'n'r'u't' 't'I' '''''''''''''''''' '''''t'u'o'b'a'''''''''''''''''s'a' 'e't'a'r'u'c'c'a' 's'a'''''''''''''t'I' ''''''''''''''''?'T''''w'o'''''''''''''''''''''d'n''''''''''''''''''''''''''''''''''''''''''''' '-' 's'''c'i'm'e'd'a'c'a''' 'h't'i'w' 'e't'a'u'q'e'd'a'n'i' 'f'o' 't'r'o's''' 'l'':'''''e'e'f''''a' ','n'a'm'u'h''' 's't'a'h'T'''''''''''''''''''''f'o''' 't'f'i'g' 'e'h't' 'h't'i'w' 's''' ''''n'k' 'u'o'y' ''''''''.'0'0'0'1'$' 's't's'o'c' '''''''''''''''''''''''''''''''''''''''''a'n'a'n'a'b' ''''b'a' 'g'n'i's's'e'u'g' 'e'r'i'''''''''''''''''''s't'a'h't' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''' 'y'e'h't' 'd'a'e't's'n'I' '.'s'r'e'e'p''''' 'o'w't' 'n'e'e'w't'e'b' 't'''n'e'r'a''s'e'm''''''''y'l'l'a't'o'''''''o't't'''''''''''''''''''''''''''''''''''''r'o'f' 'g'n'i't'''A decade ago Google Wave really needed a good quality list CRDT.'' So I got super excited when the papers for CRDTs started to emerge. [LOGOOT](https://hal.inria.fr/inria-00432368/document) and [WOOT](https://hal.inria.fr/inria-00445975/document) se'''''''w'o'n' 'd'n'A'emed like a big deal! But that excit'''''''''''I' 'n'e'h'w' 'd'e'i'd'''ement ''turned to ash when I realised the algorithms were ''too slow and inefficient to be practically useful. And I made a big mistake - I assumed'' if the ac''''g'i'b' 'ademics couldn't make them fast, nobody could. I turne''''''''''''''''''''''''''''''''''''''''''''''''''''h''' 'd'n'A''''''''''''''''''''''''''''''m'e'h't' 'g'n'i'd'a'e'r' 'd'i'o'v'a' 'o't' 'g'n'H''i'h't'y'n'a' 't's'o'm'l'a' 'o'd' 'l'l'''I''' 'd'n'a' 'y'n'a' 'n'e't't'i'r'w' 't'''n'e'v'a'h' 'I'''''''''''''''''''''''' 'e'm'a'h's' 'l'a'n'r''.'''t'u'B''''e't'e' '''!''''.'s'''y'''m' 'o't'''''''''''''''''''''''''' ')'m'e'h't' 'g'n'i'd'a'e'r' '*'e't'a'h''''H'*' 'I'''''''*' '(' '-' 'd my back on academia and dismissed them''.n'n'n''h'g'i'f' 's'h't'g'n'e'r't's''''''''s' 's'd'n'i'm' 't'n'e'r'e'f'f'i'd''''''s'd'n'i'm' 'y'n'a'M''''' 'o'w'T'' ''i't'e'm'o's'''''''''''''''''''''''''''''''''''''''''''''''''''''''.'k'a'i'n'z'o'W' 'd'n'a' 's'b'o'J'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'l'a'o'g' 'e'm'a's' 'e'h't' 'd'r'a'w'o't' 'd'e'd'a'e'h' 's'e'v'i't'c'e'p's'r'e'p' 't'n'e'r'e'f'f'i'D' '.'s't'e's' 'l'l'i'k's' 't'n'e'r'e'f'f'i'd' 't'u'b' ' 'r'O' '''''''''''''''''''''''''''''''''''m'a'e'r'd' 'e'm'a's' 'e'h't' 'd'n'a' ','e'v'o'l' 'e'm'a's' 'e'h'T''''O''''M' '.'n'a'v'i'l'l'u'S' '&' 't'r'e'b'l'i'G' 'e'k'i'l' 'k'o''''k'o'l''''''''''' 'm'o'r'f' 'e'm'o'c''''''''''''''''''''''''''''''''''''''''''''''''''''''e'm'o'c' 'y'e'h'T' '.'r'e'h't'e'g'o't' 'g'n'i'k'r'o'w' 's'f'e'h'c' 'o'w't' 'm'o'r'f' 'e'm'o'c' 't'''n'o'd''''''''''''''''''''' 's'n'o'i't'a'r'o'b'a'l'l'o'c' 't's'e'b' 'e'h't' 'e's'u'a'c'e'b' ','t'a'h't' 'w'o'n'k' 'o't' 't'n'a't'r'o'p'm'i' 's't'i' 'd'n'A'n''n'''' 'e'r'a'n'o'i'l'l'i'b' 'a' 'e'k'i'l' 'g'n'o'r'w' 'e'r'e'w' 'y'e'h'T' ''''' 'd'e'i'r't''''''''''''''''l'o'b' 'e'm'o's''''''''''''''''''''''''''''''e'c'n'''''''''''''''''''''''.'''''''''''''''''''''''' 'y''''''''y'l'd'r'i'e'w''''''''''f'o' 't'r'o's' ''l'l'a'u't'c'A' '''''.'k'o' 's't'a'h't' 't'u'B'n''s'e'm'i't' 'f'o' 's'd'n'a's'u'o'h't'''''''a's' ''e'h't''''c'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s''''''t''' ','o'N'l'a't'r'o'm' 'o't' 'h'''''''t'a'e'r'G''t'u'r'T' 'g'n'i'r'b' 'o't' 's'n'e'v'a'e'h' 'e'h't' 'm'o'r'f' 't'n'e's' ',''''''''''e'r'''y'e'h'T' '.'s'd'o'g' 't'''n'e'r'a' 's't's'i't'n'e'i'c'S' '''' '.'o'g'a' 's'e'd'a'c''''a'e'd''''a' 's'u'o'i'v'b'o' 'n'e'e'b' 'e'v'a'h' 'd'l'u'o'h's' 't'a'h't' 'g'n'i'h't'e'm'o's' 'e's'i'l'a'e'r'''''''''''''''''''''' 't'a'h't' 'g'n'i'h't'e'm'o's' 'n'r'a'e'l' 'e'm' 'e'd'a'm' 'g'n'i'h't' 'e'l'o'h'w' 's'i'h't''i'c's' 'd'e'h's'i'l'b'u'p' 's'a'w' 't'i''''''''t''''''''''''''e'n'o'y'r'e'v''n'n'''''''''''''''''''''''''''''''''''''''''''''''''''.'s'd'o'g' 'y'b' 'n'e't't'i'r'w' 't'''n's'a'w' 'r'e'p'a'p' 'e'h't' ','t'u'o' 's'n'r'u't' 't'I' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'e'h't' 'f'i' 'd'e'd'u'l'c'n'o'c' 'e'v'a'h' 'd'l'u'o'w' 'r'e'p'a'p' 'e'h't' 't'a'h'w' 's'w'o'n'k' 'o'h'W' ''e'''''''''l'l'a' 'e'w' 'd'n'A'''''''''''''''' 'e's'u'a'c'e'b' ','''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'r'e'h'c'r'a'e's'e'r' 'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'e'd'u't'i'n'g'a'm' 'f'o' 's'r'e'd'r'o' 'l'a'r'e'v'e's''''''''''''''''''''.'s'e'm'i't' 'f'o' 's'd'n'a's'''''''a's'u'o'h't'''''''''''r'o't'c'a'f' 'a' 'y'b' 'g'n'o'r'w' 'e'r'e'w' 'y'e'h'T' '.'g'n'o'r'w' 't's'u'j' 't'''n'''''''''''''''''''''''''''''''.'e'd'u't'i'n'g'a'm' 'f'o' 's'r'e'd'r'o' '3'''''u'o'h't' 'y'b' 'f'f'o'h't' 'd'e'v'e'i'l'e'b' 'e'n'o'y'r'e'v'e' ',''''''''' 'e'w' '*'e'c'n'e'i'c's' 'd'e'h's'i'l'b'u'p'*' 's't'i' 'e's'u'a'c'e'b' 'd'n'A' '''''''t'u'B' '.''''u'''''''''''''' 'e'r'e'w''''o' 's'r'e'b'm'u'n' ''o'b'a' 's'm'i'a'l'c' 'e'd'a'm' 'o'g'a' 's'r'a'e'y' 'e's'o'h'''''''''''''''' 'e's'h'o't' 'l'l'a' 'd''''l'a'e'r' 'I''''''''''''''''m'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'b' 'f'f'o' 'e'r'e'w' 's'e'r'''''''r'e'u's'a'e'm' 'e'c'n'a'm'r'o'f'r'e'p' 's't'i' 't'u'b' ','n'u'r' 's'T'D'R'C' 's'u'o'i'r'a'v''''t' 't's'a'f' 'w'o'h' 'w'o'n'k' 'o't' 'd'e'm'i'a'l'c''''''''''''''''''''''' 'w'o'h' 't'u'o'b'a''''''''' 'g'n'i'k'r'a'm'h'c'n'e'b'''''''' 's'm'i'a'l'c' 'e'd'a'm' 'r'e'p'a'p' 'c'i'm'e'd'a'c'a' 't'a'h'T''n'n'f'f'i'd' 'w'e'f' 'a' 'h't'i'w' 'm'e't's'y's' 'e'h't' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'o'o'g' 'y't't'e'r'p' 'd'e''''s'm'e'e's' '2'3''''T'''''''''r'e'h'g'i'H' '''.'''' 'g'n'i'k'r'a'm'h'c'n'e'b' 'd'n'a' 's'r'e'b'm'u'n' 't'n'e'r'e'f'f'i'd''''''''s'r'e'b'm'u'n' 'w'e'f' 'a' 'g'n'i'y'r't' 'y'b' '2'3' 'd'e'k'c'i'p' 'I' 'e't'c'a'''''''''''''''''''''''''h't'i'w' ''''''''' 'y'n'''a'm' 'o'''''''''''''''o't' 'k'n'i'l' 'a' 'e'm's'n'o'i''''''''''!'d'a'B' ''''''''''''''''''''''' ','w'o'l's' 't'''n's'i' 'e'd'o'c' 'y'M''''''' 'Y' '''''''r'i'e'''h't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e''a'''''h'T'''''''''''''''''''''.'B''m'h't'i'r'''''''''''''''''r'a'l'u'c'i't'r'a'p' 'e'''''''''' 'm'h't'i'r'o'g'l'a''''''''e'p'm'o's' 'o'''''''''''''''''''''m'r'o'f's'n'a'r't' 'l'a'n'o'i't'a'r'e'p'o'''''T'O''''''g'''''l'A' 'n'a' 's'i' 'A'G'R' '.'m'h't'i'r'o'g'l'A' 'n'a' 's'i''''''''''''''''''' 'n'a' 's'o' 'r'e't'i'p'u'J' '.'''''''''''''''''''''''''''''''''''''y'''l'e't'a'r'a'p'''''e's' 'd'e's''*''''*'''s'e'c''''''''''''''''''''''''''''''''''''''''n'n''''''''''''''*'''''*'''b''''''''''k'c'a'h' 't'a'e'n''' 'e'h't' 'e'r'o'f'e'b' 'd'e't'r'e's'n'i' 'r'e's'u' 'e'h't' 'h'g'u'o'h't' 'n'e'v'e'''''''''''''''''''''''''''''''''''''''e'r'o'f'e'b' 'd'e't'r'e's'n'i' '*'y'l'r'a'e'l'c'*' 'r'e's'u' 'e'h't' 'd'n'a' ','o'r'p' 'e'b''''p' 'o'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*''''n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s't'i' ','r'e'p'a'p' 'e'h't' 'm'o'r'F'''''''''''''''''''''''''''''' ','s'u'o'i'r'u'',''''''k'c'a'h''c' 'e'r'''u'o'y' 'f'I' ':''''''''''k'c'i'r't'''''k'c'a'h'''''''''''''''''''''''''t'i' 't'a'h'''''''''m'e'l'b'o'r'p' 't' ''''''k'a'e'w't't'p''''T' '.'''e'c'x'e' ','l'a'c'i't'n'e'''''w''' 't'u'B''d'i''' 's'i' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h' ''''y'l'l'a'u't'c'a''''''''''''''''''.'')'t'n'a''''''''''t'a'n't'r'o'p'm'i' 'y'l'l'a'e'r' 't'''n's'i' 'e'c'n'e''M'r'e'f'f'i'd' 'e'h't' 't'u'b' ';'k'c'a'h' '*'t'n'e'r'e'f'f'i'd'*' 'a' 'h't'i'w' 's'i'h't' 's'e'v'l''''''''''''t'n'e'm'u'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''nAnd oh look - those last three rows are *weird*! 29 and 23 don't add up to 65. I'm probably thrashing the CPU cache by interleaving updates in the two b-trees. Looks like a *batch_update()* method would bring that 65ms down to *52ms*'n'.'.'e'c'a'r't' 'g'n'i't'i'd'e'''''u'c'o'd'''''''g'n'i'r't's''''';'t'l'&''' 's'i'h't' 's's'e'c'o'r'p' 'o't' 's'm'9'2' 's'e'k'a't' 'n'w'o' 's't'i' 'n'o' 'y'e'p'o'R' 'c'o'd' 'e'h't''o's'e'd'i's'A'('''''''''''''''''''''' 's'j'Y' ','e'c'n'e'r'e'f'e'r' 'r'o'F'n''n'''''s't'I'''''''''''''''!''''1'l'l'e't' 'o't' '''''''''' 'e'h't' 'g'n'i'd'a'e'R'''''''''''''''e'l'b'i's's'o''''''''''s's'i'p'm'i' 's't'I' '?'s't'l'u's'e'r' 'r'i'e'h't' 'p'u' 's's'e'm' 't'h'g'i'm' 'h'c'i'h'w' ','s'r'e'h't'o'''''''''''''r'e'h't' 'f'o' 's'n'o'i's'r'e'v' 'w'o'l's' 'd'n'a' 's'm'h't'i'''''''''''''''''''''p' 'a' 'g'n'i't'i'r'w' 'e'l'i'h''''h'w' 'r'o'g'l'a' 'e'm'o's' 'f'o' 's'n'o'i's'r'e'v' 't's'a'f' 'e'v'a'h' 'y'e'h't' 'd'i'D'''''.''''''d'i''''' 'd'i'd''''''''''' 'y'e'h't' 'e'r'e'W' '?''''''''n'o'i's'r'e'v''''e' 't's'a'f' 'e'''' 'h't' '''''''''''''''''''''''''d'e'i'r'r'o'w' 'o'o't' 't'''''''t'''''''''''' 'o'''ing''''''t''' 'n'e'k'a't' '' 'o'n' 'm'''I' 'o's' ','r'o' 'n'o'i's'r'e'v' 'w'o'l's' 'e'h't' 'g'n'i's'u' 's'c'i'm'e'd'a'c'a' 'e'h't' 'e'r'e'w' 't'u'B' ''''''''' 'y'g'''n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''h'g'u''''''''''g'h'u'o'''' '''' '-' 'r'h't' 'g'''''''''''''*'d'r'i'e'w'*' 'e'r'a' ''''''''''' '''o'g'a'''d'e''''''' '''''''s'r'a'''e'Y''''''''''''''''''''s'e'e'r't'-'b' 'o'w't' 'e'h't' 'n'i' ''''''''''''''''''''''''' 'd'l'''u'o'h's''''''!'t'i' 'p'o't'S' '!'o'N' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''m'e'l'b'o'r'p' 'e'g'a'u'g'n'a'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'e'o'd''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'g'n'''''''''!'w'o'l's' 's'i' ''i't''https://josephg.co' editin' trace'g' ' javascrip' strin''g't'a'''''w' can'' merg' co'.''''''''''' 'e'h't' 'o't' '-' '''nc'rren' edit''''''''''''''''''''''':'r'e't's'a'f' 't'o''''t'l' 'a' 's't'i' 't'u'B' '.'' bu' it' 's't's't'''ud'e't'e'm/blog/''''''''''''''''''e'c''''''''''''''''''''''''''' javascript' no''' 't'''' not''''g'n'''i'r'' allow'' ', using a javascript string, well''''''''''''''''''''''''''''''''d'''''''''''''''''''''''it might not concurrent edits but ''''''''''''''' 'd'e's'a'b' ''''''''''''''''''''''''''e'g'u'h'''''''''''''''''w'o'l's' 'd'n'a' 'g'i'b' '''''''''''''''''''''''''''''''d'n'a''''i' 'a'i'm'e'd'a'c'a' 'n'o' 'k'c'a'b' 'y'm' 'd'e'n'r'u't' ''s't'e'g' 's'e's'u' 'e'g'r'e'm'o't'u'a' '''''''''''''''''t's'a'f' 'y'r'e'v' 't'''n's'i' 'e'e'r't''d' 'e'h'T''''''' '''T''''''''''' 's'i' 'e'e'r't' 'A'''its slow:'''''''' 's't'i' 't'u'b' 's't'i'd'e' 't'n'e'r'r''''d'u'c'n'o'c' 'e'g'r'e'm' 't'''n'a'c' 'e'w''t's' 't'p'i'r'c's'a'v'a'j' 'a' ''a'r't' 'g'n'i't'i'd'e' 'crdts-are-the-future/'i'd'e' 't'n'e'r'r'u'c'n'o'c'''''''''''''''''''''''' 't'o'n' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'g'n'i't'i'd'e' 'e'v'i't'a'r'o''''''''''s'r'a'e'y' 'r'o'f' ''b'a'l'l'o'c' 'f'o' 'e'r'u't'u'f' ''' ''e'h't''''''''''t'a'h't' 's'e'o'd' '' 'e'r'''y'e'h't' '''''''' 'k'n'i'h't' 'I''k'n'i'h't' 'I' '''as '''''''''''''''''''''*'''''''''*'' ''*''''*'''''''''''''''''''''''''''''''''''''''''''''''''''''''t'a'h't'''''''''''''''''''''''''''''''o't' 'w'o'''h' 't'u'o' 'e'r'u'g'i'f' '''''''''''''''''''''''l'l'a'c' 't'a'h't''''''''''''''''''''''''''''''''''''''''''''''d'n'a' 's'r'e'p'a'p' '','''''''''''''p'p'a''''''''''p'p'a' 'g'n'i't'n'i'o'p'p'a's'i'd''''c' ''''''''''''''''''''''''''n'a'c' 'e'w' 'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'r'e'b'm'u'n' 'e'c'n'a'm'r'o'f'r'e'p' 'e's'e'h't' 't'a' 'e'v'i'r'r'a' 'o't' 'l'l'a' 't'a' 'e'm'i't' 'o'n' 'd'n'a' '''o''' '''''''''''''''''''''''''''''''''.'t'n'i'o'p' 's'i'''''''''''''''''''y'b' 's'D'I'U'U' 'g'n'i'd'i'o'v'a' 'h't' 'o't' ' ''s'u' ''.'''g'''n'i'r'b' 'd'n'A' ''''''''h' ''''''''''''''''t'i' 'e'v'o'l' 'I''''''''''''''t'n'a'i'l'l'i'r'b' 's't'i' 't'u'b' ','''o't' ''t'a'''''''''''''''''''''''''''''''''r'e'l'p'm'i's' 'h'c'u'm' 'o''''i's' 'g'n'i'h't'y'r'e'v'e' 's'e'k'a'm' ''''''''''''''''' 'd'n'a' 'e'l'o'h'w' 'e'h't' 'n''''''t'b'u'o'd''.'I''''o''''a' 'a'i'm'e'd'a'c'''''''''''''''''''''''''''','g'n'i't'i'a'w' 'f'o' 'e'd'a'c'e'd' 'a' 'r'n''e't'f'a' ',''a'''''''''''''''''''''''''''''''?'l'''''''''''''''''''''a' 'e'r'a' 'e'r'e'h't' 't'u'B' '.'''' ''''B''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'e'r'e'h' 'n'o' 'g'n'i'o'g''''''''''''''.'s's'e'm' ''' I'm not even sorry.''''''''''g'n'i'o'd' ''''''' 's'd'n'a'h' 'f'o' 's't'h'g'i'e'l's' 'y'r'e'p'p'i'l's' 'w'e'f' 'a' 's'''e'r'e'h't''''s't'i' 'h'g'u'o'h't' ';''''a'e'r' 'r'o'f' 's''''''''''g'n'i'k'r'a'm'h'c'n'e'b' 'e's'e'h't' ''''''''''''''''s'k'r'a'm'h'c'n'e''''e'b' 'e'h't' 'e'r'A''''''''''''''''''''''''''''''t's'u'r'-'t'd'r'c'-'t'x'e't'/'g'h'p'e's'o'j'''''''''''e't'/'g'p'h'e's'o'j'''''''h'''''''''''''r'a'k'm'c'n'e'b''''''''''''''''''''''g'n'i'n'n'u'r' 'y'b' 'k'r'''''''r'k'a'm'h'c'n'e',''B'' 'e's'e'h'''''''e'g'T''''We need to ta'T'lk abou''t b''''''''''e'r'u't''''''''''''''''''''''''''''d'e'''l'b'a's'i'd' 'r'o' 'd'e'l'b'a'n'e' 'e'b' 'n'a'c' 'c'u'r't's' ''''''o's'l'a' 'en''Thes''e benchmark''s ''B'''''''''''''''''' 's'k'r'a'm'h'c'n'e'b' 'e's'e''.'''''h'T''''''''''''''''''''''''''n'e'b' 't'u'o'b'a' 'k'l'a't' 'o't' 'd'e'e'n' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'u'o' 'g'n'i'm'o'c' 't'r'a't's' 's'r'e'b'm'u'n''''''''''''''''''''''''s'k'r'a'm'h'c'n'e'b'-'t'd'r'c'/'g'h'p'e's'o'j' 's'a' 'n'o'o's' 's'a' 'n'u'r' '''''''''''''' 's'a' 'n'o'o's' 's'a' 's'k'r'a'm'h'c'n'e'b' 'e''''''''''''''''''''''''s't'd'r'c'-'e'c'n'e'r'e'f'e'r'/'g'h'p'e's'o'j'''''''''''''e'c'n'e'r'e'f'e'r' 'y'm'h't' 'g'n'i'l'l'i'k''''''''''''''''''''''s'a' 'C'+'l'r'''''''_'l't'c'''''''c''''T'C' 'n'e'h't''''c' ','g'a'l'f' 't'a'h't' 'h't'i'w' 's'k'r'a'm'h'c'n'e'b' 'e'h't' 'g'n'i'n'n'u'r' 'n'e'e'b' 'e'v'''I' '.''e'W''Your benchmarks are weird / wrong / misleading''Al''b''' 'l''' ar' lies'e'B' yes''ver' clever.'''y'''enchmarks''Your benchmarks are weird / wrong / misleading''''''''''B''''b''' 'l'l'''''''''''''s''Ye''s ye','I know. I've made a few sleight' I'' no' even'' sorr'.'''' writin' 'g'-'''' ' 'y't'm's of hand which I want to 'fess up to and defend.''' ver''y clever.'n### How do I run these benchmarks myself?n''''s'''e'i''''''s'''''''''''''.'r'e'v'e'l'c' 'y'r'e'v'''e'y' ''l' 'e'r'a' ''A'''''''''''s'k'r'a'm'h' But its alm''o''s''t'' ''a''l''l'' ''o''n''l''i''n''e.''c'n'''e'B''''' 'h'''''' ''' ''- writin''g ''t''''' '''''''n'n''''''''''''''''''''''''''''''n'e'v'e' ''''''''.'''''''''''' 'g'n'i't'i'r'w' '-'''' ' 'y'r''''r'o's' 't'o'n' 'm'''I' '''''''''''''''''' 't'''''''''''''''''s'n'o'i't'a't'n'e'm'e'l'p'm'i' '''h'g'i'e''''a'w't'h'g'i'l' ','''' 't's'''''' ',''a'f' 'r'o'f' 'a'l'u'm'r'o'f' 'e'h't' ''''''''''''s'T'D'R'C' 't's'a'f'i'w' 'd'e't'a'r't's'u'r'f' 't'o'g' 'I'' 'g'n'i'r'e'w's'n'a''doing that work''''''''''''''''''''''h't' 'd''''''t'r'a't'''''''''''e'k''''''t''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'''''''''''''''''''''''''''''''''''''''''''k'r'o'''''''''''''''''''''''''''''''''''s'k'l'''''''y'r''''''''''''''''nA decade ago Google Wave really needed a good quality list CRDT. So I got super excited when the papers for CRDTs started to emerge. [LOGOOT](https://hal.inria.fr/inria-00432368/document) and [WOOT](https://hal.inria.fr/inria-00445975/document) seemed like a big deal! But that excitement turned to ash when I realised the algorithms were too slow and inefficient to be practically useful. And I made a big mistake - I assumed if the academics couldn't make them fast, nobody could. I turned my back on academia and dismissed them.n'n'n'n'-'-'-'n'n'n'n'n'n'n'n'a'n'i'b'o'f' ''''' 'r'e'h't'o''''''''''''''''''''''''''t'n'a'i'l'l'i'r'b'''''''r'''o'f' 'd'e't'n'e'v'n'i'''''''.'e''''''''''''' 'r'e'd'r''''''''''''''''e'r'e'h'w''''''d'n'a' ','''y'r'e'v'e' 'o' 'n'i''''n'i'l'p''''''''''','''''''''''' 's'''n'i'v'e'K''''e'h't''''''''''e'h'T'''''''''''''''''''''''h'''''''''t'e'b' 'I''''''''e'h't' 's't'I' '.'''''k'c'a''''''''''''''''''''''''''''''''e'd'a'c'''''''''''''m'e'h't' '''t'i' ''f'o' 'y'n'a' 'e'd' 't's'a'l' 'e'h'''''''''r'e'h't'i'e' 't'i''t' 'r'e'v'o' 'a'e'd'''''''a'e'i' 't'a'h't' 'o'r'p'p'a' 'n'o'i't'r'e's'n'i' '+' '''''e's'r'u'o'c' '''f'o' ''o'e'p' 'r'e'v'e'l'c' 'f''''''''''''''''''''''''''' 'd'l'u'o'w' 'I' 'k'n'i'h't' 't'''n'o'd''''''''''''''''''''''''''''''''''''''.'r'e'h't'i'e' 't'a'h't' 'f'o' 't'h'g'u'o'h't' 'e'v'a'h' 't'''n''''''' 'e'v'a'h''''n' ''''n'd'l'u'o'w' 'I'o'''.'''I'''''''''''''''''n'n'a'm'p'p'e'l''''''''''''s't'i' ''''''t'i' 'l'l'e'K' ' 'h'c'n'u'b' 'a' '''''''''''' '''m''''''''''''''''''approach ''' 'n'o'i't'a''''i't'n'e's'e''''''''''''''''''''''''e's'e'h't'''''''''''u'o'''''''''''f'l'e's'y'm' 's'y' 'e'v'e'i'l'e'b' 't'''n'o'd' 'I' ''''''''''''''''''''''''''''''''''''''''s't'l'u's'e'r' 'k'r'a'm'h'c'n'e'b' 'r'u'o'y' 'n'u'r'-'e'r''''''''''''''''''''''''?'s't'l'u's'e'r' 'r'u'o'y' 'e'c'u'd'o'r'p'e'r' 'I' 'o'd' 'w'o'H' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s't'l'u's'e'r' 'r'u'o'y' 'd'e't'a'r'e'n'e'g' 'h'c'i'h'w' 'e'd'o'c' 'e'h't' 'd'e'h's'i'l'b'u'p' 't'''n''''''''''''''''''''''''''''.'e'n'i'l'n'o' 'l'l'a' 't'''' 'e'h't''s'o'm'l'a' 's'','''t'i' '''''''''''''''''''''s't'd'r'c'''''''n'i''''''''''''o'''t'n'i' 'd'e'm'm'a'j' 'l'l'a' ''-'e'c'n'e'r'e'f'e'r' 'd'n'a' 't'u'B' '''''''s't's'e't' '.''''e'v'a'h' 'u'o'Y' '#'#'#''n'n'''''''''''''''''''''''''''''''''''''''''''''''''m'o'r'f' 'e'm'o'c' ''''''''''''''''''''''n'o'i's'r'e'v' 's'i'h't' 't'a' ','''''s'd'e'e'n'''''''''''''''n'a'r' 'I''''''''''''''''''''''''''''''''''''''e'g'd'o'p''''b' 'e'g'd'o''''The reference-crdt'''s't'i's ben'''''e'r'e'h' '''chmark code is [in the repository here](https://github.com/josephg/reference-crdts/b''y'b'lob/m'''''''''''''''''''''''''''''''''''''f'o' 'p'o't' 'e'h't' 't'a' 't'n'a't's'n'o'c'''''''''c' 'l'a'b'o'l'g' 'e'h't' 'g'n'i't'i'd'e'''''''''''''''''''''''''' ''''''''''w'o'h' 's't'a'h't'g'n'i'k'r'a'm'''''''''''''''''''''''''''''''''''''y'l'e't'a'r'u'c'c'a' ''''''''''''''''''''''''''''''''''t'n'e'm'n'o'r'i'v'n'e' 'g'n'i't's'e't' 't'i'n'u' 'e'h't' 'n'i'''''''''''''''''''''''''''''''''''')''''''''''''''''''''''''''''''''''''''''y'r'o'm'e''''''''''''''''''''''''''''''''''s'k'r'a'm'''''''''''''''''''''''''''''''''''''''''''''''n'o'i's'r'e'v' 's'i'h't' 't'a' ','y''https://github.com/josephg/reference-crdts/tree/fed747255df9d457e11f36575de555b39f07e90')'9'(''r'o't'i's'o'p'e'r' 's'i'h't' 'm'o'r'f' '''''(']'s't'.'s't'd'r'c'h'c'n'e'b' '''''''''''''''''''''''''''''[' 'n'o' 's'd'n'e'p'e'd' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 's't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'e'h'T' 'm' 'e'h't' 's'e'g'n'a'h'c' 'e'd'o'm' 't's'e't' 'e's'u'a'c'e'b' 's't's'e't' 'g'n'i'r'u'd' 'e'g'a's'u'''''''u's''''''' 'g'n'i's'u' 'y'r'o'm'e'm' 'e'r'u's'a'e'm' 't'''n'a'c'''' 'u'o'y' 'e't'o'N'(' '.'g'n'i's'u' 's't'i''h'c'n'e'b' 'e'l'i'h'w'''''''''''''''''''''''''''''''''''''''''''t'u'o' 'g'n'i't'n'i'r'p' 'f'o' ''''''''''''''''''''''''''''''''node --loader ts-node/esm --expose-gc bench.t'`'s'`' 'h't'i'w' 'e'd'o'c' 's'i'h't''''''''''' 'e'd'o'c' 's'h'i't' 'n'u'r' 'n'a'c' 'u'o'Y' '.'''''' 'd'n'a' 't's'i'g' 'e'h't' 'm'o'r'f' 'h'c'a'o'r'p'p'a' 'e'h't' 'w'o'l'l'o'f' ','ain/'''''''''''''''''''''''s'e'i'r'e'u'q' '''d'd'a' 'o't' 'd'e'e'n' 'l'l'''bench.ts). If you want to measure m'''emory usage you can use the same approach as I did'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''https://github.com/josephg/reference-crdts/blob/main/bench.t'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''i' 'd'i'd' 'I' 's'a' 'h'c'a'o'r'p'p'a' 'e'm'a's' 'e'h't' 'e's'u' 'n'a'c' 'u'o'y' 'e'g'a's'u' 'y'r'o'm'e'm' 'e'r'''''''''''''m' 'r'e'u's'a'e'm' 'o't' 't'n'a'w' 'u'o'y' 'f'I'''''''a'c' 'u'o'Y' '.')'s'(']'e'r'e'h' 'y'r'o't'i's'o'p'e'r' 'e''''i'h't' 'n'i'[' 's'i' 'e'd'o'c'''''''''h't' 'n'i' 's'i' 'k'r'a'm'h'c'n'e'b' 's't'd'r'c'-'''' 'e'c'n'e'r'e'f'e'r' 'e'h'T'n'n'h' 'a' 'f'o' 't'i'b' 'a' 's'''''''''s't'l'u's'e'r' 'i' 'g'n'i'h't'y'r'e''''v'e' ','' ''''''''''''n':''''''''''''''t' 'f'o' 't's'o'm' ','''''''''''nThe benchmark code for my JS string baseline, yjs and automerge is [in th'''''''''''' 't'n'a'w' 'u'o'y' 'f'i'is github gist](https://gist.github.com/josephg/13efc1444660c07870fcbd0b3e917638). Its a mess; but messy code is better than missing code.nnFor my rust implementation I'm benchmarking [this code](https://github.com/josephg/text-crdt-rust/t''n'n''''''''' 'o's'l'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''https://github.com/josephg/crdt-b'''''''''''''''n'u'r' 'o't' 'r'e'd'r'o' 'n'i'enchmark''''''''''''''''''''''''''.'s't's'e't' 'e's'e'h't' 'f'o' 't's'o'm' 'r'o'f' ')'s'(']''''''''y'r'o't'i's'o'p'e'r''''''''''r'o't'i's'o'p'e'r' 's'i'h't'[' 'm'o'r'f' '`'z'g'.'n'o's'j'.'r'e'p'a'p'-'e'g'r'e'm'o't'u'a'`' 'd'e'e'n' 'l'l'''u'o'Y' 'ree/ba20b6386c0472958f33024ce0b806e75470e1ca). Run it with `cargo criterion yjs` or `cargo criterion ropey` to isolate the ropey baseline. Turn on and off the inline rope updates my commenting out lines near the top of src/universal/doc.rs. You can add `--features memusage` to print out memory allocator statistics - which is how I'm figuring out how much RAM I'm using.nnI haven't uploaded my rust crdt wasm wrapper anywhere.'n'n':'''''''''''' 's'''e'r'e'h''''' 'e'h't' ','f'l'e's'r'u'o'y' 's'k'r'a'm'h'c'n'e'b' 'e'h't' 'f'o' 'y'n'a' 'h't'i'w' 'y'a'l'p' 'o't' 't'n'a'w' 'u'o'y' ''''''''''''''''''''''''''''''''''''''''''''''e'w' ''e'''w'''''o'h' 's'i' 'y'l's'u'o'i'r'e's' 'e'r'o'm' 't'o'l' 'a' 'e'k'a't' 'o't' 'd'e'e'n' 'e'w''''f'I'n'n''r'p'e'r'''''''' 's'n'h'a'''''''''''''''' 't's'u'm'''''''''g'n'i's'u' 'f'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'l'l'''''''''''''''y'l'p'p'a''''''.'k'r'o'w' 't'''n's'e'o'd' ''''a'u't'n'e'v'e''''''''t'i' 'e'v'a's' 'n'e'h't' 'd'n'a' 'n'e'p'o' 's't'i' 'e'l'i'h'w''''' 'r'o'f' 'm'a'r' 'n'i' 't'i' 'p'e'e'k' ','t'c''''t'e'j'b'o' 'n'a' 'd'a'o'l''' 'f'o' 'l'e'd'o'm' 'e'h't' 'o's' '-' '''''''''''','d'i' '''''''''''''''''''''''''''''''''''''''''.'r'e'h't'i'e' 't'a'h't' 'f'o' 't'h'g'u'o'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'n'o'i't'c'a' 'n'i' 't'a'h't' 'e'e's' 'o't' 'e'v'o'l''''''''''e'v'o' 'd'''I' '''''''''''''''''''''''''''''''''''''.'n'o'i't'c'a' 'n'i' 't'a'h't' 'e'e's' 'o't' 'e'v'o'l' 'd'''I' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'n'o'i't'c'a' 'n'i' 't'a'h't' 'e'e's' 'o't' 'e'v'o'l' 'e'r'u's' 'd'''I' 't'u'b' ';'t'h'g'i'r' 'y'l'l'a'u's'u' 's'i' 'n'i'v'e'K''''I''''''d''''''d'I' '.'y'a'w' 'e'l'b'a'n'o's'a'e'r' 'a' 'n'i' 's'i'h't' 't'n'e'm'e'l'p'm'i' 'o't' 's'r'e'd'i'v'o'r'p' 's'''s'j'Y' 't'p'a'd'a''''''''' 's'i'h't' 'o'd' 'n'a'c' 'u'o'y''''''''''' 'e'r'a' 'e'r'e'h't' 's'y'a's' 'n'i'v'e'K' ':'t'i'd'E' '>'n'n'''''''n'n''h't' 'e'v'a'h' 't'''n'd'l'u'o'w' 'I'''''''''''''''''''''''''''''''''''''''''' 't'a'h't' 't's'a'p' 't'h'g'i'r' 'd'e'k'l'a'w' 'e'v'a'h' ''''''''''t'''n'd'l'u'o'w' 'I' 'k'n'i'h't' don't''''''''''''l'u'o'w' 'I' 'k'n'i'h't' kno'''''''''''''''''''''''''' 'n'a'c' '''I''''''''''g'h'u'''''x'0'1' 'o'h't' 'e'v'a''' 'f''''''''''''s'e'c'n'e'r'e'f'f'i'd'o''h' ''''''''''''''' 't'''n'd'l'u'o'w' 'I' 't'a'h't' 'w'''''''''''''''w'o'n''''''''''''''''''''''''''''''''''''''''''''''y'm' 'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''h't'i''''''''''h'''n'n''''''''''!''''''''o'S''''''.'w'o'n'k' 't'''n'o'd' 'I' 'i't'w' 'o'd' 'o't' 'g'n'i'h't'y'r'e'v'e' 'd'n'a' ','t'u'o'y'a'l' 'y'r'o'm'e'm' 'h't'i'w' 'o'd' 'o't' 'g'n'i'h't'o'n' 's'a'h' ''''''''''''''''''''''''''''''''''''t'r'a'p'a' 'e's'a'e't''''''''''''''''''''?'r'e'l'i'p'm''''''''''''''''''''''''''''''''''''''''''''''''''?'t'h'g'i'r' ','l'a'm'r'o'n' 's'''' 't'a'h'T' '.'s'e'i'r'o't's' 'g'n'i'k'r'a'm'h'c'''''''c'h'n'e'b' 'e'v'o'l' 'I' ''o'c' 't's'u'r' 'e'h't' 'o't' 's'k'n'a''''''''''s'k'n'h't'''''''''o't' 'e'u'd' 'y'l'p'm'i's' 's'i' 's'j'y' 'd'n'a' 'e'e'w't'e'b'''''''n'e'e'w'e'b' 'e'c'n'e'r'e'f'f'i'd' 'd'e'e'p's' 'e'h't' 'f'o''''f' 'h'c'u'm' 'w'o'H'k' 't'''n'o'd' 'I' 't''''''''s'e''''''''d'i'o'v'a' ''l'p'u't''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ','c'i''''''''''''''''smart ''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'i' 'g'n'i'c'i't'o'n' 't'u'o'h't'i'w' 't's'a'p' 't'h'g'i'r''''''' 'g'h'r'i't' 'd'e'k'l'a'w' 'y'l'e'r'u's' 'e'v'a'h' 'e'l'p'o'e''''p'p''p''''''''p' 't'r'a'm's' '0'0'1' 't'a'''''''''s't'h'g'i'e'l's'h't' 'a'e'd'i't's'a't'n'a'f''''''''''''j' 's'u'o'i'v'b'o' 'f'o' 't'r'o's' 'e'h't' 's'i' 'e'r'e'h' 'e'b'i'r'c's'e'd' 'I' 'h'c'a'o'r'p'p'a' 't's'i'l' 's'''n'i'v'e'K' 'd'n'A' '.'t'a'h't' 'h't'i'w' 'p'u' 'e'm'a'c' 'o'h'w' 'a'e'd'i' 'o'n' 'e'v'a'h' 'I' ')''''''''''''''''''d'n'A' '.'s'u'i'n'e'g' 's'i' ''n'e'g'a'(' ''o' 'm'e't's'y's''''''''''''''''''''''''' ''''d' 'n'a' 'g'n'i't'a'r'e'n'e'g''''''''' 'g'n'i'r'o't's' 'e'v'a's' 'o't'''''''''''''''''s'D'I'U'U' 'f'o' 'd'a'e't's'n'i' ' 'e'h'T'''''''' 'e'h'T'''''''''''''''''''''''''''''''''''''''''''e'g'r'e'm'o't'''''''''''''''''''''''''''''''''''''''''''''''' 'n'''''''''''''''''''''''''''''''''''''s'r'e'b'm'u'n' 'e'c'n'e'u'q'e's' 'g'n'i't'n'e'm'e'r'c'n'i' 'g'n'i's'U''''' 'd'n'A' '''''i''' 't'n'e'l'a'v'i'u'q''''''''''u'q'u'e' 'e'h't''''''' 's'''s'j'Y' 'r'o'f' 'n'o'i't'a'r'i'p's''''''''''i's'p'n'i' 'e'h't' 's'a'w' 'd'n'a' ',''u'A' 'r'o'f' 'e'd'a'm' 'n'i't'r'a'M' '''''''''''''''''''''''''''''''''''''.'''''''''''''''' 'd'n'a' '-' 'c'i't's'a't'n'a'f' 's'i' 'm'e't's'y's' 'g'n'i'd'o'c'n'e' 't'n'e'm'u'c'o'd'''''-'n'u'r' 's'''e'g'r'e'm'o't'u'A''''''''''''''''''''''''' 't'i' 'e'n'o'd' 'e'v'a'h' 't'''n'd''''n'l'u'o'c' 'I' ''''''''''''n'''n'a'm'p'p'e'l'K' 'J'''''''''''n'i't'r'a'M' 'd'n'a' ''''o'r'f' 's'a'e'd'i' 't'a'e'r'g' 'e'm'o's''w' 'd'r'''''''''''''''!'e'd'u'd' 's'k'n'a'h'T' ''a'h' 'e'm'o's' ',''''''''''''''.'')'*'n'i'v'e'K''''k'*' 'd'n'a' 'e'd'a'c'e'd' 'a' 'k'o'o't' 't'i' ','l'l'e'W'(' '.'s'm'h't'i'r'o'''''''o'''''''h'r'i'g'l'a' 'e's'e'h't' 'f'o' 'e'r'u's''''t'a'e'r't' 'e'h't' 'h't'i'w' 'n'r'u't'e'r' 'd'n'A' ''s'a'f' 'a'm''''a' 'o't' 's'r'a'w'o't' 'g'n'i'n'r'u't'''''''''''''''''''''''''''''' 't'n'e'i'c'i'f'f'''''''''' systems''Wow' ' wa''''s'I','''''''''''s''But''''l'l'e'W' it'''''''''''''''' tur'https://githu'''e'h't'b.com/aut'''''''''''''''''''''''h'c'a'o'r'p'p'a' 't'h'g'i'r' 'e'h't' 's'a'h' 'omerge/automerge-perf/'ns '[''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'd'o'h't'e'm' 'l'a'u'd'i'v'i'''''''''''n'o'i''you're'''''''''''''''''''''e'v'i'v'r'u's''''''''y'a'''''''''''' ','r'a'f' 'y'b' 't'u'B''w'y'n'a' ' 't'''n'o'w' 't'i't'c'n'u'f' 'a'd'n'i' ''''''''''''''''''''''''''''''''''.'r'e't's'a'f' 'g'n'i'h't'e'm'o's' 'h't'i'w' 't'i' 'e''''i'c'a'l'p'e'r'g'n'i'z'i'm'i't'p'o' 'o't' 'g'n'i'v'o'm' 'e'r'o'f'e'b' ''''''''''b'''''' 'n'e'h'T' '.'''s'e'r'u't'c'u'r't's'''' 'a't'a'd' 'd'n'a' 'm'h't'i'r'o'g'l''''n'a''''''''''''''d'n'a' 'm't'h'i'r'o'g'l'a' 'e'r'o'c' 'e'h't' 'x'i'F' '.'out I'''''https://github.com/automerge/automerge')'/'(']' was'''''s'a'w' 'I' ',''''s't'I'w'o'W'm'e't's'y's' 'e's'o'h't' 'f'o' ''e' 't'u'o'b'a' '''''''''''''''''''''''''''' '.'n'u'r' 'o't' 's'e't'u'n'i'm' '5' 'y'l'r'a'e'n'g'n'i'h't'y'n'''''''''''''''''n'i''''''''''''''''s'd'n'o'c'e's' '''''''''g'n'i'''''' 'k'o'o't' 'I''5'6'0''''6'.'0' '.'l'l'i'm'''n'''u'r' 'o't' ''a''''' 'n'o'i''''''''''''' 'n'i'o't'''a'c'o'l''''''''''''''''''5'6'''''''4'5''''''''''''''''''''''r'e't's'a'f' 'x'0'0'0'5' 'y'l'r'a'e'n''''''''W''''w''' 'o'S'''''''''''''''''''''''''''''t's'r'i'F' '''.'o'n' ','t'i''''''''' 'h't'r'a'e' 'n'o''a'''''''n'a' ''W'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' all the steps''''''''''''''''''''''.''''t'u'B't's'a'f' 'r'e'p'u's'':' 't'i' 'e'k'a'm' 'o't' that make it fast.'''' ''I '''''''''' 'I' '''' 'h'g'u'o'r'h't' 'u'o'y' 'e'k'a't' 'l'l'''I''''''!'r''Sometimes when I pick up a new '''''''''''''''''k'c'i'u'q' 'a' 'd'n'a' 'h'O'''''''''''''''' ':'e'd'i's'a' 'n'a' 't's'u'J'(''''''''''''''''''''''''''''I' '.'t'n'e'''''t'e'y'''''''''''''''''''''''''e'm'i't' 'e'm'i'r'p' 'r'o'f' 'm'o'm' 'e'h't' 't'a' '''e'''g'r'e'm'o''''''''''''''''''''''''''''''''' 'o'''''''''''''''''''''''s'''''' 'r'e'h't'o' 'd'n'a' 's'j'Y' 'i'S'''''''''''''''''''''''''''s'n'o's'a'e'r' 'e'h't' 'f'o' 'e'm'o's''' 't'I' '.'n'o'i't'a'd'n'e'm'm'o'c'e'r' 'y's'a'e' '''''''''''''''y'a'w' 'e'm'a's' 'e'h't' 'n'i''n''''''' 's'a''t'u'a'''''e'c'n'''''''''''''t'i' 'd'n''''''''''t'n'e'm'e'l'p'm'i'a't's'r'e'd'n'u''o'''''''''''''''''''''''y'd'a'e'r' 't'o'n' 's't'i' '-' 't'e'y' ''['''''''''''''''''''''''''''e'm'a's' 'e'h't' 'n'i' 'h't'o'b' ',' https://github.com/yjs/yj''')'s'(']''''''t' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'a''' 's'u'o'i'''s''r'u'c' 'e'r''''''''''''''''''''''''''''''''''''''''''''!'e'e'r't' 'a' 's'a' 's'i'h't' 'w'a'r'd' 'n'a'c' '''''e'W''''''''''''')'!'n'o'o's' 'y'h'w'''''''''''''''''''''''''''''''' 'y'm'''''''''''''''''''''''''''''''''''o't' 's'e'g'n'a'h'c' 'n'i' 'd'e't'l'u's'e'r'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''protocol''''''d'n'''''e's'o'h't''A' '''''''''y'k'r'a'l'a'm'''''''''''''''''''''''''''''''''''''''''''''''''''''y'l's'u'o'i'v'b'o' ','o'o't' 'e'n'o'g' 'e'r'a' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'n'''''e'h'''''''e'j'T'''''''''''''''''''''''''''''''''''''''''''''''a''''''''')'e'v'i't'i'r'e'p'm'i' '>'-' 't'p'i'r'c's'a''''''''''''''''''''g'n'''''''''''''t' 'n'g'i's's'a'i's's'e'u'g' 'y'l'n'o' 'm'''''''''''''''''''''''''''''''''''''''''''''''''''su''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y''''''e'd'''o'c' ''''''y''' ','d'n'A''m''''''''''''''''''''''''''''''''''''f'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'r'e'h' 'w'o'h's' 'I' 's'n'o'i't'a't'n'e'm'e'l'p'm'i' 'n'e'e'w'''''''''''''''''''''''''''e'''''''''''''''''''''''''' 'g''!''''''''e's'a'e'l'p' 'n'i'k'r'a'm'h'c'n'e'b'''''e'd'o'c' 'e'h't' 'e'm' 'w'o'h'S'l'b'a'c'u'd'o'r'p''''''''''''''''''''''''''''''''''''''''?'s't'l'u's'e'r' 'k'r'a'm'h'c'n'e'b' 'e's'e'h't' 'd'e't'a'r'e'n'e'g''''e' 't'a'h't' ''e'r''''''''''''''?'e'l'b'a'c'u'd'o'r'p'e'r' 's'i'h't' 's''''''''''''''''i'h't' 'S'I' ''''''''''''''''''''''''' '.'u'o'y' 'e'v'e'i'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''','e'n'i'l'e's'a'b' '''g'n'i'r't's' 'S'J' 'y'm'''''''''''t'p'i'r'c's'a'v'a'j' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'd'o'c''''''s'k'n'i'l''''''e''' ''d'o'c' ' '''''''''''''''''''''''''.'g'n'i's's'i'm' 'n'a'h't' 'r'e't't'e'b' 's'i' 'y's's'e'm' 't'u'b' ';''''.'s's'e'm' 'a' 's't'I' '''''''''''''''''''''''t's'i'g' 'b'u'h't'i'g' 's'i''' ''h't' 'n'i''''''''https''''''''''e't'a'l'o's'i' 'o't'://gist.github.com''n'n'''/josephg/13efc1444660c07870fcbd0b3e91763''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'i' 'h'c'i'h'w' '-' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.')'g'n'i's'u' 'm'''I' 'M'A'R''''r' 'h'c'u'm' 'w'o'h' 't'u'o' 'g'n'i''''''''''''' 't'u'o'r'u'g'i'f'''''''''''' 'g'n'i't'a'r'e'n'e'g' 'm'''I' 'w'o'h' 's'i' 's'i'h'T'(' '.'''''''''''''T'(' '.'s'c'i't's'i't'a't's' 'r'o't'a'c'o'l'l'a' 'y'r'o'm'e'm' 't'u'o' 't'n'i'r'p' 'o't' '`'e'g'a's'u'm'e'm' 's'e'r'u't'a'e'f'-'-'`' 'd'd'a' 'n'a'c' 'u'o'Y' ''''''''''''''''''''''''''''''''''t'd'r'c' '' 't's'u'r'''''''''''''''''''''''.'e'r'e'h'w'y'n'a' 'r'e'p'p'a'r'w' 'm's'a'w' 'y'm' 'd'e'd'a'o'l'p'u' 't'''n'e'v'a'h' 'I'n'n'''''''''''''''''''''''''https://github.com/josephg/text-crdt-rust/tree/ba20b6386''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'r'.'c'o'd'/'l'a's'r'e'v'i'n'u'/'c'r's' 'f'o' 'p'o't' 'e'h't' 'r'a'e'n' 's'e'n'i'l' 't'u'o' 'g'n'i't'n'e'm'm'o'c' 'y'm' ''''''''''''''o' 'e'h't' 'r'a'e'n'''' 'n'i' 's'e't'a'd'p'u' 'e'p'o'r' 'e'n'i'l'n'i' 'e'h't' 'f'f'o' 'd'n'a'''''''a'o' 'n'o' 'n'r'u'T' '.'e'n'i'l'e's'a'b' 'y'e'p'o'r' 'e'h't' 'r'o'f' '`'y'e'p'o'r' 'n'o'i'r'e't'i'r'c' 'o'g'r'a'c'`' 'r'o' '`'s'j'y' 'n'o'i'r'e't'i'r'c' 'o'g'c0472958f33024ce0b806e75470e1c'''''''''''''''''''r'a'c'`' 'h't'i'w' 't'i' 'n'u'R' '.')'a'(']'e'd'o'c' 's'i'h't'[' 'g'n'i'k'r'a'm'h'c'n'e'b' 'm'''I' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 't's'u'r' 'y'm' 'r'o'F' '.')'8'(']'e'r'e'h'[' 's'i' 'g'n'i'n'n'u'r' 'm'''I' 'e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'y' 'r'o'f' 'e'd'o'c' 'k'r'a'm'h'c'n'e'b' 'e'h'T'n'n'y'a'l'p'''''''''''''t''''&' 'y'f'i'r'e'v' 'o't' 't'n'a'w' 'I' ''e'b' 't'''n'o'd' 'I'''''''''''''''''''''''''''''''''''''''''''''?'s'k'r'a'm'h'c'n'e'b' 'r'u'o'y' 'n'u'r'-'e'r' 'o't' 'e'd'o'c' 'e'h't' 's'i' 'e'r'e'h'W''''''''''''''''''''''d'e'h's'i'l'b'u'p' 't'''n'e'v'a'h' 'u'o'Y' '#'#'#'n'n'n''t'e'b''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'a'h't' 'f'o' 't'u'o' 'k'c'e'h' 'e'h't' 'd'a'e'r' 'd'''I' '.'e'd'i'u'g' 'd'e'l'i'a't'e'd' 'e'r'o'm' 'a' 'h's'i'l'b'u'p' '''''''''e'm' 'w'o'h's' 'd'n'a' 's'e'c'n'e'r'e'f'f'i'd' 'e'c'n'a'm'r'o'f'r'e'p''''''''''''' 'd'n'a' 's'e'g'n'a'h'c' 'e's'e'h't' 'f'o' 'h'c'a'e' 't'r'a'p'a' 'l'l'u'p' 'o't' 'e'n'o'e'm'o's' 'r'o'f'''' 'o't' '*'e'v'o'l'*' 'd'''I' ',''''''u'o'y' ''''''' ','s'r'e'h't'o'b' 's'i'h't' 'f'''' 'I''o'''''''''''''''f'f'u't's''''''''''s'c'i'f'i'c'e'p's' '''''''''d'e'Yes. This is a reasonable criticism of this approach. I covered too much territory here to be as thorough as I'd like. I did benchmark 4 different CRDT implementations here - 2 of which I wrote myself from scratch. And this post is nearly 7000 words. If this bothers you, please do more detailed benchmarks. I'd love to''t'n'e'v'n'i''''''''''s'w'e'n' 'e'k'a'f''''''''''r'e'l'i'p'm'o'c''''''''''p'm'o' 't's'u'r' 'e'h't'''f'o'''''''''''''t's'a'f' 's'i' 't's'u'r' 'e's'u'a'c'e'b' tidying up automerge'''' '''s'u'o'i'v'b'o' 'e'm'o's' 'g'n'i'o'd' ''''''''''''''''''''''e'g'r''''''''''''''''''''''''''''''''''''''''''''''' 'd'e'l'i'a't'e'd' 'e'r'o'm''''''''''''''''''''''''''''''' 'o't' 'e'v'o'l' 'd'''I' '.'s'k'r'a'm'h'c'n'e'b' 'e's'o'h't' 'o'd' 'e's'a'e'l'p' ','u'o'y' 's'r'e'h't'o'b' 's'i'h't' 'f'I'''''''''''''e's'o'p'p'u's' 'I' 'o'S' '''''e'm'o't'u'a' 'p'u' 'g'n'i'y'd'i't' 'd'n'a' 's'j'e'l'b'a't'u'm'm'i' 'g'n'i'v'o'm'e'r' 't's'u'j' 't'c'e'p's'u'''''''u's's' 'I' '-' 'h't'r'o'w' 's't'i' 't'a'h'w' 'r'o'f' 'd'n'A' ''''v'a'j' 'P'F'(' '.'''''''(' 't'n'e'r'e'f'f'i'd' 'y'l'l'a't'o't' 's'i' '''''A''o's'a'e'r' 'r'e'v'e't'a'h'w' 'r'o'f' '''''''''' 's'''e'g'r'e'm'o't'u'a' 't'u'o''''''''''''''''''''''''''''''''''''''''' 'e't'u'b'i'r't's'i'd'''''''''''''''''''''''''''''d'e'n'e'p'p'a'h' 't'a'h't' ''''''''''''''''''''''''''''''''''.'s'e'g'n'a'h'c' 'e'h't' 'l'l'a' 't's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i'h't' 'f'o' 't'r'o'''''''''''''''''''''''''''''.''Yes. This is a reasonable criticism of this approach. I covered too much territory here to be as thorough as I'd like. I did benchmark 4 different CRDT implementations here - 2 of which I wrote myself from scratch. And this post i'''''''''''''''''''''''''''.'y'd'a'e'r'l'a' 's'd'r'o'w' '0'0'0'7' 'y'l'r'a'e'n' 's''Y''.'T'''''''''?'p'u' 'e'd'a'm' 't's'u'j' 's'i' 's'r'e't'n'i'o'p' 'f'o' ''s' 's'i'h't' 'r'o'f' ''''''''''''''''''''''''n'o'i's's'u'c's'i'd' 'y'm' 'l'l'a' 'd'n'a' ','t'p'i'r'c's'a'v'a'j' 'n'a'h't' 'r'e't's'a'f' 'h''''''''''''''''''' 's'i' 't's'o'p' 's'i'h't' 'd'n'A' 'c'u'm' 't'a'h't' 't's'u'j' 's'i' 't's'u'r' 'e'b'y'a'M' ''g'n'o'm'a' 'p'u'd'e'e'p's' 't'a'h't' 'e't'u'b'i''''''''''''.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h' ''''''''''''''''''''''''''''''''''''''''''h'c't'a'r'c's' 'm'o'r'f' 'f'l'e's'y'm' 'e't'o'r'w' 'I' 'h'c'i'h'w' 'f'o' '2' '-' 's'n'o'i't'a't'n'e'm'e'l'p'm'i' 'T'D'R'C' 't'n'e'r'e'f'f'i'd' '4' 'k'r'''''''''' 'r'k'a'm'h'c'n'e'b' 'd'i'd' 'I'''e'W' '.'e'k'i'l' 'd'''I' 's'a' '''''''h'g'u'o'r'o'h't' 'e'b' 'o't' ''.'e'r'e'h' 'y'r'o't'i'r'r'e't' 'h'c'u'm' 'o'o't' 'd'e'r'e'v'o'c' 'I' '.'h'c'a'o'r'''''''r'a'p'p'a' 's'i'h't' 'f'o' 'm's'i'c'i't'i'r'c' 'e'l''''''''''e'l'i'b'a'n'o's'a'e'r' 'a' 's'i' 's'i'h't' ','s'e'y' 'd'n'A'c'i'h't'i''''o'l'o'n'o'm'r't'''t'a' 'o't' 'w'o'h' 'w'o'n'k' '*'y'l'l'a'e'r'*' 't'''n'o'd' 'I'h'g'u'o'r'h't' 'p'u' 'p'o'p'''''''''d'e'r'a'e'p'p'a' 't'a'h't' 's'y'a'r'r'A'8't'n'i'U' 'e'h't' 'l'l'a' 'd'n'A' '.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''?'p'u'd'e'e'p's' 'e'h't' 'e't'u'b'i'r't't'a' 'e'w' 'd'l'u'o'h's' 't'a'h'w' 'o't'''''''''''''''''''s'i'h't' 'f'o' 't'r'a'p'''h'c' 'h'c'i'h'w' 't'u'B''''' 'w'o'H' '.'e'g'n'a'h'c' 's'i'h't' 'm'o'r'f' 'e'c'n'a'm'r'o'f'r'e'p' 'x'0'1' 't'o'g' 'e'W''''''''e'd'o'c' 'y'M'''''''h'T'n'n''''''''''''''s'''''''''''''''''''''''''''''''''''''' 'm'o'r'f''''''''''''''''''''''''''''''''''i''' 'o'S''''''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''t'a'h't' 'r'e'w's'n'a' 'o't' 'e's'o'p'p'u's' 'I'n'n'.'''''''''' 's'a'r'e'h'w' ';'e'r'e'h' 's'p'u'd'e'e'p's'''''''''''''''''e'c'n'a'm'r'o'f'r'e'p' 'e'h't' 'g'n'i't'u'b'i'r't't'a's''''''''''''i'm' 'm'''I' 'e'l'b'i's's'o'p' 's't'I' '''' '.'g'i'b' 'y'l'r'a'l'i'm'i's' 'e'r'a''''''''''''' 'e'd'o'c' 't's'u'r' 'y'm' 'o't' 's'j'y' 'd'n'a' ',''''''''''s'i' 's'j'y' 'o't' 's't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'm'o'r'f' 'e'g'n'a'h'c' 'e'h'T''''''''' 'n'a'c' 'w'o'H''''W''''''''''''''''''''''''''''''''e'h't' 'e'd'a'm' 's'e'g'n'a'h'c' 'e's'e'h't' 'f'o' ''''''''''''''''''''''''''''''''''''''''''''''''''Which''''''' 'h'c'i'h'W'n'n'e'l'y't's' 't'p'i'r'c's'a'v'a'j' 't'n'e'r'e'f'f'i'd' 'a' 'd'''''''d' 'e's'U' '-'n'l'o'c'o't'o'r'p' 'd'n'e'k'c'a'b' '/' 'd'n'e't'n'o'r'f' 's'''e'g'r'e'm'o't'u'a' 'd'e'v'o'm'e'R' '-'n's'j'e'l'b'a't'u'm'm'i' 'd'e'v'o'm'e'R' '-'n')'t's'i'l' 'o't' 'e'e'r't''''''''''''''''' '>'-' 't's'i'l'(' 'e'r'u't'c'u'r't's' 'a't'a'd' 'e'r'o'c' 'e'h'T'''''e'r'o'C' '-'n'n':'s'e'g'n'a'h'c' '''''''''s't'd'r'c'-'e'c'n'e'r'e'f'e'r'''''''u'a' 'o't' 'e'g'r'e'm'o't'u'a' 'm'o'r'f' 'g'n'i'v'o'M' ' 'e'e's' 'l'l'''''''''''l'u'o'Y'''''''''''''''''''''''''''''''t'c'a' 's's'a'l'c' 'a''''''''''''''''''w''' '-' 't'i' 't'e'g' 't'''n'o'd' 'I'''''''s'i' 'y'h'W'' 's'i' 's'n''''''''?'''w'o'l's' ''''' 't'''s'u'j''o's''h'a'J''''Y' '''' 'n'i'v'e'K' '.'''s's'e'n'i's'u'b' 'e'h't' 'n'i' 't's'e'b' 'e'h't' 'y'l't'n'e'r'r'u'c''''''' 'e'h't' 's'i' 's'X''''j'Y' '''https://github.com/yjs/y''''''''''''''''''''''''''''''' 't'u''''''''''''''''''''l'u'o'h's' 'r'e't'c'a'r'a'h'c' ''o' 'e'r'u'g'i'f' 'e'w' 'o'd' 'w'o'h''''''''''''''''''''''?'t's'r'i'f' 's'e''''''''''''''''''''''''' 'n'o' 'd'e's'a'b' 'm'e''''''''''''''''''''''''''''''''''''''''e'g'r'e'm'o't''''''''''''''''''''''''''' 's''''''t'''I' '.'k'c'a'h' 'a' 'f'o' 't'i'b' 'a' 'h't'i'w''u'A''''''r'e'v'e'.'''c'X'b'a''' 'h't'i'w' '''''''''''s'''m'e't'i' 'w'e'n' ''p'u' 'd'n'e' 'd'''e'w' 'n'e'h't'h'''''''''''''''''''''''''''''''s't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'y'm''''''''''''''''''''''''''''' 't'e's' 'u'o'y' ','''o''' 'e'b''t'g'n'i'h't'y'n'a' 't'r'e'''''''''''''''''''''''''''''''''''''''''''''' ','e'l'p'm'a'x'e' 'r'o'f'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'i'h't' '''''''''''''''e'g'r'e'm'o't'u'a' 'n'a'h't' '','''''''' 'p'u' 's'd'n'e'''''''''''''o's'l'a' 's't'I' '.'''''''''''t' 'g'n'i's'u' ','e'd'o'c' 'y'm' 't'u'B' '.'s'j'e'l'b'a't'u'm'm'i' 'e's'u' 't'''n's'e'o'd'''''''''e'o'd' 'o's'l'a' 'n'o'i't'a''''i't'n'e'm'e'l'p'm'i''''o' 'y'm''''''''''''''''''''' 'g'n'i't'n'e'e'l'p'm'i' 't'o'n' ''''n'm'''I' '-' 'e'k'i'l'-'r'o'f'-'e'k'i'l' 'y''''''' '-' 'p'o't'S'''''''''''!''''''''.'g'n'i'''y'd' 'm''''''''' 'm'I''''''l'''''t'''''c'a'x'e' 't'o'n' 's't'I's'n'i'''''''''''''''''''t''''':'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'r'-'e'g'r'e'm'o't'u'a''''w' '''''''''''''''''''''''''''''''''''''''''''''''''' Definitely don't submit any PRs to f''''''''''''''''''''''''''''.'t'i'u'r'f' 'g'n'i'g'n'a'h' 'w'o'l' 'e'h't' 'l'l'a' 'x'i'''''''''''''''''''''''''''''''''''''''''''i'f' 'o't' 's'R'P' 'y'n'a' 't'i'm'b'u's' 't'''n'o'd' 'y'l'e't'i'n'i'f'e'D' ''''t'''''.'''''''*'h'c't'i'w'T'*' '.'t'i' 't'u'o'b'a' 'k'n'i'h't' 'o't' 't'o'n' 'y'r'T' ''n'.'''r'e't't'a'm' 't'''' '''n's'e'o'd' ''''''' 'd't'i' 'o'S' ''h't'i'w' 'd'e'c'a'l'p'e'r' 'n'e'e'b' 's'a'h' 'y'd'a'e'r'l'a' ''''''''''''' 'y'l't'h'g'i'l's'''''''''''''''''''''''''''''''''''''''u'o'y'''''''''''''',''''e's'a'b''e'n'i'f' 's't'i'''''''>''' Wow I saw a sequence number, and it was *this big''''''!''''''''''''''''''''''''''''''''.'m'e'h'A' '.'''''''''*'!'r'e'g''''e'g'i'b' 'n'e'v'e'*' 's'i' 'e'n'i'M' '?'h'a'e'Y'''''''''Y' '.'*'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!'''''!'*'g'i'b' 's'i'h't'*' 's'a'w' 't'i' 'd'n'a' ','r'e'b'm'u'n' 'e'c'n'e'u'q'e's' 'a' 'w'a's' 'I' 'w'o'W' '>''n'n'''''''''''' 'o'W'('n'n''''''r'e'v'e't'a'h'w'''''''''''''''''''''''''''''''''''''''''''''')'w'o'n' 't'a'h't' 'o't'n'i' 't'e'g' 't'o'n' ''('s't'e'l''''''''''''''''''' 's'i' 'e'c'n'e'r'e'f'f'i'd' 'e'h't' 't'u'b' ','g'n'i'h't' 'r'e'b'm'u'n'''''''''''''''''''''''''''''''''''')'.'y'a'd' 'r'e'h't'o'n'a' 'r'o'f' 'm'e'l'b'o'r'p' 'a' 's't'a'h't''m''''''''''''''o't' 'g'n'i'o''''''*'e'r'e'h'''''''''''''e'r'e'j'*''''('''''''*'(''''g' ''''''h't' 'r'e'n'm'u'n' 'e'c'n'e'u'q'e''''''''' ','m'h'u' ','h'U''s''''e' 'e'h't' '''o't' 'h'c'a'o'r'p'p'a' 't'n'e'r'e'f'f'i'd' 'a' 's'a'h' '')'s'''''''''''' '.'r'e'v'e't'a'h''''''''''t'h'a'W''''''''''y'n'A' ''''''''''''''a''' 'r'o'F''''How fast is it?''''''''''''e'g''5'7''''''r'e'm'o't'u'a' ' ''''''''''''''''''?'A''t'i' 's'i' 't's'a'f' 'w'o'H''''''''''''''''''g'''''''''''''''''' 'e'c'''''''m'o'r'f''''''''''''e'd'a'm' 'f'l'e's'm'i'h' '''a'r't' 'g'''' 'n'i't'i'd'e' 'n'a'n'i'','b''''''s''''''''''f'o' 'e''''''''''' 'p'u' 'g'n'i'p'y't'''c'a'''''''''n'i'''r'''t' 'u' '''''' ''''''o's'l'a' 'n'w'o''t'i' 't's'e't''''n'u'r'''''''s'a'f''''''''''''''''''''t'''n'''s'i' 'h'c'i'h'w' ','''''''''''''y'''a'''''y'l'n'o' ''w''''''''''y'w'a'y'n'a' ''e'w''''e' 'w'o'h' 'o'S'''''''n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i''''e'h't'''y'm'h't' 'f'o' 't'r'o's' 't'a'h't' 'o't'n''''''''''''''''' '-' 'o'n' ','t'i'a'W'i' 'e'r'''u'o'y' '''''''''''''d'n'u'o'r'a' 'k'c'i't's' ''f'i' ''''''''''''''''''''''''''''''''''''''''s'e'm'o'c'e'b' ''''''''[''''The editing trace'''''''' 's'i'h'T''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'k'o'r't's'y'e'k' 'y'r'e'v'e' '''''''''''' ','s'a'h' 'n'a'C'''''''''''' '2'^'n'?'''''''''m'a'r'g'a'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'a'h't' 'o'd''''k'a'm' 't'i' 'd'i'd' 'w'o'H'''''''''''''''''''?'o'd' 't'i' 'd'i'd' 't'a'h''''''' 's's''j'Y'w''''l' 'o'S' '.'s'm'e'l'b'o'r'p' 'e's'e'h't' 'd'e'x'i'f' 's'a'h'''''''r'e'v'e' 's''''''''''''t'n'e'm'u'c''''''''''''''''''''''''''''''''l'l''''''''''''y'l'b'a'b'o'r'p' 'y'e'h't'''r''''''''''''''''''''''''''''' 'y'l'l'a'u'''s'u''m'e't's''s'y's' 'e'''''''''''''''''''n' '''''''n'n''''o'i't'a'c'o'l' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''B' '.''')'''s'n'o'i't'a'c'i'l'p'p'a' 'g'n'i't'i'd'e'-'t'x'e't'-'n'o'n' 'r'o'f' 'l'l'e'w' 's'a' 'k'r'o'w' 't'''n'd'l'u'o'w''''''''''o'w'''''''o'w'''''''u'w'o' 'y'l'b'a'b'o'r'p' 't'i' 'd'n'a'(' ''d'e'h'c'a'c' 'e'h't''h't' 'o'S' '.'e'''t'a'l' 'g'n'i'h't'e'm'o's''''o't' 'y'r't' ''o'd' 'e'h't''j'y' 'n'a'e'm' 'I' ','e'w' 'y'b' 'd'n'A' 'd' 't'r'e's'n'I' '>''''n'n''h't'i'w' 'r'e'w'o'l's' 's't'e'g' 't'i' 't'u'b' ','t's'a'f' 'f'f'o' 's't'r'a't's' 'm'e't's'y's''''a' 'e'h'T''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s''n'n'''''A' ''''''r'''e't'c'a'r'a'h'c' '0'0'0''' ''''' '''.'b'k'0'0'1' 't'''u'o'b'a' '''''''''''''''''''''''''''''''''''''s'e's'u' 'e'g'r'''''''''''''''''''''''''''''''''''''''''.''''''''''''''''''''''''''''''''''''''''''''''''''''''''a' 'g'n'i's'u' ','''''''''''''''''''''''''''''''''''''''''''''''''''''w'o'l's' '''s't'i' 't'u'b' ''''''''''''''''''r'e't's'a'f' 's'i' 's'i'h'''''''' 'o't''''' 'u'o'y'T' '.''''' 's't'i'd'e' 't'n'e'''''''''''''''''''''''''''''''''''''''''''''''''''''e't''.'T''o'r'w' 'e'w' 't'a'h'w' '''' 'l'l'a''f'o' 'n'o'i's'r'e'v' 'd'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''')'m'e't'i' 's'u'o'i'v'e'r'p' 'e'h't' 's'i' 't'n'e'r'a'p' 's''''''''''''''''''''''''''''''''a' 's'a' 'm'e't'i' 's'u'o'i'v'e'r'p' ''''''''''e'r'p'e'h't' 's'a'h' 'm'e't'i' 'h'c'a'e' ''''''s'd'e'e'n'd'n'a' ','e'm'i't' 'h'c'a'e' '1' '''''' 'r'e't'a'l''y'b' 'p'u' '''''''''''''p'u' 't'''''''''''''''''''''''''''''''.''''''i'''''' 's'i'h't''' 't'u''''t'e's' ''B'x'e'''g'n'i''l'p'm'o'c' 't'i'b' 'a' 's'i'''''y'a'r'r'a'' 'c'i'g'o'l''''' '''''e'''''h't' 'o's'o'g' 's'd''' ','''i''' 'e'h't'''''''''''''''''''e'h't' 's'i' 't'n'e'r'a'p' 'h'c'a'e' 'e'm'u's's'a' 'e'W'(' '''''''(' '.'''' 'e's's'e'r'p'm'o'c' 'a' 't's'u'j'''''''j' ' 's'i' 's'i'h'T'r'r'u'c'n'o'c' 'w'''''''''''''s'i' '''n'u'r'''''o''''''''''' 'l'l'a' 't'h'g'i'm' '''''''''''''''':''''':'r'e':''''w'o'l's' 'h'c'u'm' 's't'i' ','''' 'l'l'e'w' ',''''[''I'''''''y'l'''https://immutable-js.github.io')'/'(']'' ''''t'c'e'r'i'd' 't'p'i'r'c's'a'v'a'j' 'n'i' 't'a'h't' 's's'e'c'o'r'''p' 't's'u'j' 'e'w' 'f'''''''''?'h'g'u'o'h't' '''I''' '''''W'''''''''''''''''e'r'a'p'm'o'c' 'n'a'c' 'e'W'*'s's'e'r'p' 'y'e'k' 'r'e'p'*' 'm'a'r' 'f'''''''i' 't'u'b' ',''o''''f' 'b'k'0'1' 's't'a'h'T' '!'a'o'h'W'''''!''''!''''.'w'o'W' ''e'm'o't'u'a' ','e''''w'n'o'd' 's't'i' 'e'm'i't' 'e'h't' 'y'b's'i' 'e'z'i's' 't'n'e'm'u'c'o'd' 'l'a'n'i'f' 'e'h't' 'd'n'a' ','s't'i'd'e' '0'0'0' ''''0'0'8'2' 's'a'h' ''M'''''''''''''''''''' 't's'u'j''''' 'e'c'a'r't' 'g'n'i't'i'd'e' 'e'h'T'n'n''''''''''''a''' ','''''''e'v'o'b'a' 'y'a'w'y'n'A''''''''(''''''''')''''''''''''''''''''https://github.com/dmonad/crdt-benchma' 'rk''''''''''''''''''''''''''''''''''''''''''''''''''''''t'a'h't'''''o'o'A''t' '''''''''''''e'g'''r'e'm'o't'u'a' ''''''''''''''''''' 'r'i''''''''''''''''''''''using Nod''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'''''''''''''''''''''.''''''''''''o'd' 'w'o'h' 'o'S't'e'y' 'd'e'd'n'a'l' '''''''''''''''e'h't' 'f'o' 'n'''''''''''''''''''''''' 'g'n'i't'i'r'w' 'f'o' 'e'H''''''''''''''r''''''''''''''''''''''''''''''''''''''''''''''''''e't'i'r'w'e'r' 'a' 'n'i' 'y'a'w'a' 't'i' 'w'o'r'h't' ''''''''''''' 'e'h't' '''''''''''k'c'a'b' 'n'w'o'r'c' ''m'i'a'l'c''''''''''''e'h't' 'm'i'a'l'c'e'r'o't' 't'u'o'b'a' 'e'r'''u'o'y'''''''''a' 'e'r'''o'u'y' 'n'e'h'w'''''''''''''''''g'n'i't'i'r'w'e'r' 'e'r'o'f'e'b'''''''''''''''''''''a'f''''''''''''''''''''''''''''''''''''''''''''' 'n'o'i't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'''''''s'j'Y' '.'e'd'a'm' 'l'l'e'w' 'd'n'a' 'd'e't'n'e'm'u'c''''u'o'd' 'l'l'e'w' ','t's'a'f' 'pretty''really'''''''''y'l'l'a'e'r''y'l'l'a'e'r' 's't'i' 'd'n'A''''A'''''''e'K' '.'s'n'h'a'J' 'n'i'v'e'K''''H''''J' 'y'b' 'e'd'a'm' ''a't'n'e'm'e'l'p'm'i''''''''''''''''''''b'u'h't'i'g' 'n'o''''''' 'n' 'm'h't'i'r'o'g'l'a' 'T'D'R'C' ')'g'n'i't'e'p'm'o'c'(' 'r'e'h't'o'n'a' 's'i' ' 's'a' '''''''' 'n'e'''g'n'i''''''h'''t' 'd'n'a'''''''e'r'o''''g'n'i'''f'e'b''''''''''''''''''''''''''n'a'c' '''t'i' ''u'o'y' 'n'e'h'w'e't'u'p'm'o'c' 'e'h't'm''There's an old saying with performance tuning:'''''''''''''''''''''''''''''''''''''''''''''''''s'g'n'''''''''''''''''''''''''''''''''.'''':'W''m'a'e't' 'e'g'r'e'm'o't'u'a''''''''r'e'm'o'u't'a' 'e'h't' 'h't'i'w' 'e'e'r'g'a' 'I' ''i'h't' 'g'n'i'v'o'r'p'm'''''i' 'd'n'a' 'e'd'o'c''A''' 'e'h't' 'h'g'u'o'r'h't' 'g'''''''''''''t'h'g' 'n'i'o'g' 'm'o'r''''''''''x'i'f''''''''''''''''.'t'i' '''e'v'o'r'p'm'i'''''''m'I''' 's't'e''''''''''s't'E'L'''''''' ''''''''''''''''''s'i'h't' 'h't'i'w''''''''''''''''''d'e't'a'c'i'l'p'm'o'c' 'e'r'o'm' 's'''''''l' '''' 't'u'B'''''''''''''''''''y'b' 'd'e'r'e'e'n'o'i'p'''''''''''e'K' '''''''''''''t'u'o'b'a' 'g'n'i'k'''','''l'''''')'?'(' ''a't''''''''''''''''''''''''''''''''''y'a'r'r'a' 'e'h't' 'o't'n'i' 'g'n'i''''''''''y'l'e'r'a'r' 'o's'c'i'l'p's' ','e'r'e'h'''*''W'''e'r'''e im'''g'n'i'plement a li'*'st CRDT with a l'''''It sounds complicated - how do you figure out where the new item should go? But'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''I'.'s'k's'a't' 'g'n''''''''o't'''''''f'o' 'e'n'o'''''''''' 't'n'e'm'u'c'o'd''' '' 'e'v'a'h' ''i't'i'd'e'-'''''''e' 't'x'e't'-'n'o'n'''''''' 'f'u't's'''''''a'r'e't'n'i' 'r'o'f' 't's'a'f' 'e'b' 'd'l'u'o'h's'''''''''''''d'e's'u' 'e'b' 'l'l'i'w' 'e'd'o'c' 's'i'h't' 'd'n'A' '''''''n' '.' its complicated ''''r'u'o'y'like *math* is complicated. Its hard to unders'''''''''''''' 'm'o'r'f' 't's'u'j' ','tand, but when you do, you can do the whole thing i''''''''''''''''''''''s'r'a'''e'y' 'w'e'f' 't's'a'l' 'e'h't'.'E''''''''' 'n'i' '''''''','w''''''''''''''''''!'''''''''''''s'e'g'a'p'b'e'w' 'g'n'i'k'a'm' 'n'e'h''''e'w' 'n'e'v'e' ','n about 20 lines of code.'n'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''[''''''''''' 'l'l''https://github.com/josephg/reference-crdts/blob/main/crdts.ts'a''''''''https:''''''''''''''''''''''' ''''''''''''''''''''.'l'i'a't'e'd' 'e'r'o'm' 'n'i' 's'i'h't' 'd'''' 'n'a't's'r'e'd'n'u'''''''''''''''''''''m' 'n'i' 't'u'o' 's'i'h't' 'e'r'u'g'i'f'//github.com/josep'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'e'c'n'e'r'e'f'f'i'd' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h't' '''''''''''''''''''''''''''''''''e'c'n'a'm'r'o'f'r'e'p'''''''''''''''''''''''''''''''''''''''''''t'u'o'b''''''''''''''''''''y'r'o'm'e'm''' 'n'i'a'm' 'm'o'r'f' 'a' '''n'i' 'm'e't''.'''''','n'i'a'g'A''i'''''''i't' 'y'n'a' 'd'n'i'f' 'n'a'''''''''''''''''''''''''''' 'a' 'n'i' 'g'n'i'h't'y'r'e'v'e' 'g'n'i'l'f'f'u'h's''c' ''''c'e'w' 's'n'a'e'm' 't'a'h't' '' 's'''s'j'y' '''''''''''''l'a'c'i't'n'e'd'i' 'e'r'a''d'n'a' 'e'g'r'e'm'o't'''''''t'o'u'a'''''''''''''''''''' 's'c'i't'n'a'm'e's' 'T'D'R'C' 'e'h't'''''''''''''''' 'e'c'n'e'r'e'f'f'i'd' 'e'h't''''''''''''e' 'e'h't' 'l'l'''''''''.'t'e'y''''''''''t'e'u' 't'i' '''a''''' ''','s'i'h't' 'e'k'i'l' 'd'e't'n'e'm'e'l'p'm'I'''''''''''''''''''''''''''''''''''' ''''''''''''''' 'f'o' 'k''''''''''''''''''''''''''''''''y'r'o'm'e'm' 'n'i' 'r'e'h't'e'g'o't' 'd'e'k'c'a'p' 'l'l'a' ','c'o'l'b' 'a''s'e'''e'''''''''' 'l'l'a' ',''''''e'r't'-'b' 'y'm' 'n'i' 'e'd''''e'o'n' 'f'a'e'l' 'h'''''''''''''''''''t'o'N' '.'''e'l'c'y'c' 'k'c'o'l'c'c'a'E'''r'e'm'o't'u'A''''C' ''''''''''''''''''' 'h't'o'B' 'hg/referen'''''''''''''''' 'o't' 't'n'a'w' 'u'o'y' 'f'i' 'ce-crdt')'s'(']'e'''n'n'n''''r'e'h' 's'i' '''e'd'o'c' 'e'h'T' '.'''''''''''''''''''''''''''''''''''''''d'l'u'o'c' 'I' 'e'v'o'r'p' 'o't'''' ''''''''''''''''''''''d'n'a't's'r'e'd'n'u' 'd'l'u'o'c' 'I' 'o's' ','e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' 's'''''''''''''''''''''''''''''''''''e'h't''' 't''''''''''''''' 't's'e't' 's'i'''''''''''' '?'t's'a'f' 'w'o'H''h't' 'n'i''''''''''''''''''''''y'a'w'y'n'a' 'l'a'c'i't'n'e'd'i' 's'i' 'u'B'''''''''''''''''''''''''''''''''.'e'c'n'a'm'r'o'f'r'e'p' 'l'a'c'i't'n'e'd'i' 'e'v'a'h' 'y'e'h'T''''' 't'u'B' '.')'s'j'y'''''''s'j'(' 'A'T'A'Y''''''''''''''''(' 's'j'y' 'd'n'a' ')'e'g'r'e'm'o't'u'a'(''c'i't'n'a'm'e'''''''a'm's' 'e'h't'''''''''''''''''''u'a'(' 'A'G'R' 'h't'o'b'''''''s'y' 'f'o' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'n'a' 'e'v'a'h' 'I' 'e's'a'b'e'd'o'c' 's'i'h't' 'n'I''''B'n'''s'''I made'' Implemented like this, the automerge and yjs's performance''a'b'e'd'o'c'''''' 'T'D'R'C' 'y'o't' 'a' 'n'i' 'h'c'a'o'r'p'p'a' 's'i'h't' 'g'n'i's'u' 'f'l'e's'y'm' 'e'g'r'e'm'o't'u'A' 'd'n'a' 's'j'Y' 'h't'o'b' ''''''''''''''o'w't' 'e'r'a' 'e'r'e'h'T'''d'e't'n'e'''''''''''''''''''x'i'f' 'o't' 'd'e'e'n' 'e'w' 'e'd'o'c''m'e'l'p'm'i' 'I''''''''''f'f'e' 'n'a' 'n'''''''''''w''' 'y'a's' 's't'e'L''''L'I'n''n'ist. Geniu''s'S'''!' 't' ''h'''''''''''''''''''''t' 's't'I'n'n''c'i''''''''' 'y''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'k'i'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''n'n'n''t'u'o'b'a' 'n'i' 'g'n'i'h't' '''S''''''''''''s''' 't'a'h't' 'e't'o'N'n'''' Some of thos''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t''''''''' 'm'''I' ''''''''''''''''''''''''t's'o'p' 's'i'h't'5''''''''''y'a'r'r'a' ' 'n'i''''''''''''''''''''''''''''s'r'e't'c'a'r'a'h'c''''''''''''''t' 'f'I'''''''''''''''''''''''''''''''''''''''.'d'e't'e'*'''''''''' 't'n''*'e'm'u'','w''''''''c'o'd'''''''''''''''''''''''''''w''''''''' ','t'u'o' 'd'n'i'f' 'o'T''''''t'n'e'm'u'c'o'd' 'r'u'o'''l'''e'd'''''''''''''''''''''''''n''''''i''' 'o'S''o'i't'a'c'o'l' 'y'a'r'r'a' 't'h'g'i'r' 'e'h't' '' 'n'e'e'b' '''''t'''n'e'v''''''''''''' 'g'n'i'h't'e'm'o's' 'r'o''a'h' 'h'c'i'h'w' 's'm'e't'i' '0'''' '0'0' '0'0'1' 'g'n'i't'n'e'''''''''''''''''''''''s'e'k'i'y' 'e'l'b'u'o'd' 's'i' 'h'c'i'h'w' ',''s'e'r'p'e'r' ',''''''''''''M' '.''''''''''''5'''''''''''.'w'o'n' 'r'o'f' 't'a'h't' 't'u'o'b'a' 'y'r'r'o'w' 't'o'n' 's't'e'l' 't'u'B' ''a'r'D'''''''''''''''''y'a'r'r'a' 'y'm' 'n'i' ''''''''' '.'g'n'a'D''''''!'')'s'p'o'O'(' '.'m'e'h't' 'n'o' 'd'n'e'p'e'd' 't'h'g'i'm' 's't'r'e's'n'i'''''''''''''''''''''a' 't'r'e's'n'i' 't'h'g'i'm' 's'r'e'e'p' 'r'e'h't'o' 'e's'u'a'c'e'b' 'y'a'r'r'a' 'e'h't' 'm'o'r'f' 'm'e'h't' 'e'v'o'm'e'r' 't's'u'j' 't'''n'a'c' 'e'W' ''e'n'o' 'h'c'i'h'w' 'k'r'a'm' 'o't' ''.'''''''''''''''''''''''.'h'c'u's' 's'a''''s' 'm'e'h't' 'k'r'a'm' 'o't' 'g'a'l'f' '`'d'e't'e'l'e'D's'i'`' 'n'a' 'd'e'd'd'a' 'e'v'''I' 'o's' ','''e items might h'I'''''ave been deleted:'n''e'l'''''''''''' 'l'e'o'h'w' 'e'h't' 'o'd' '''n''''''.'o'o't' '''a'c' 'u'o'y'''''''''''''''''''''''''''' 'u'o'y' ','o'd' 'u'o'y' 'n'e'h'w' 't'u'b' ','d'n'a't'''''s'r'e'd'n'u' 'o'''t' 'd'r'a'h' 's't'I''.'d''''.'e't'a'c'i'l'p'm'o'c' 's'i''''''''''''''''''''''''''''''''''d'e't's'e'r'e't'n'i' 'e'r'''u'o'y' 'f'i' '''f' 'u'o'y' 'e'c'n'o''''' 'e'h't' '-' '''''''''''''''''''''''''''''''''''' i' yo' wan' to.'t'u'f',''''''''''''''''''''''''''''.'o't' 't'n'a'w' 'u'o'y' 'f'i' ',''''''''''''''t'r'o'h's' 'n'I''W'''''' We'' impleme'n'nt a list CRDT with a list. Genius!'n'''''This approach is better for lots of reas''o''' We implement a list CRDT with a list. Genius!'ns :n''''This app'''''s'e'o'd' 'roach''''.'''''''''''l'l'a' 'e'r'''''''r'e'v'e'e'W'''''''''''''''''''''''''''''''''r'e'v'o' 's's'e's'b'o' 'e'w' 't'a'h'w''''''''''''''''''''''''''''''''''''''.'''''''''''c''''h'''''''''''''''''''''''''''''p'u' 'd'e'x'i'm' 'r'e'b'm'''''''''''''''' 'r'e'm'b'u'c'u'c' 'd'n'a' 'i'n'i'c'c'u'z' 't'e'g' 'l'l'i't's' 'I''''''t'''n'''''''t'''o'd' 't'u'b' ','''' 'h'g'u'o'n'e' 'l'l'e'w''''p' 'e'd'o'c' 'n'a'c' 'I' '''r'u'o'''''''s'e'i'''''''''''h''' 'e''''''''''e'r'''e'''h's''''h'a''w' 't'u'b's'u'a'c'e'''''''''''''''''''''''''''''''''' 'd''''''''''''''''''l'u'f'e's'u' 'y'l'l'a'c'i't'c'a'r'p''n'a' 'w'''''''''''''l'u'f'e's'u''''''''''l'''a'c'i't'c'a'r'''p' 'e'b' 'o't'o'l's' 'o'o't' 'e''''''''''''''''' 'l'a'c'i't'c'''''''''' 'd'e's's'i'm's''''m'i'd''a'r'p' 'r'o'f' ''r'e'''''''''''''''''''o't' 's'e'm'o'c' 't'i' 'n'e'h'w'w'''''''''''''' 'd'n'a' 'g'n'i'd'a'e'r'''''''''''''''''''''''d'n'a'(' 'g'n'i't'i'r'w' ' 's'm'h't'i'r'o'g'l'a' 'e'h't'B'''''''''''''''','''''''e'''''e'k'a'm'w' 'n'e'h'w''''''''''''k'r'o'w' ''''''''t'n'e'm'u'c'o'd' 'a' 'n'i' '''i'''''''e'r'e'h' 'n'o'i''''''''''''n'i'o't'a'z'i'm'i't'p'o' 'a'r't'x'e' ' '''bette' 'r''beautiful 'is ' 'bet''ter for lots of reas''ons :n''''''''''''''''''''''''' 'r'e't't'e'b''''''' '''''''''''.'s't'n'e'm'e't'a't's' 'f'i' 'w'e'f' 'a' 't's'u'j''' ''''l'2' 'g'n'i'e'b' 'p'u' 's'd'n'e' 'g'n'i'r'e'd'r'o' 'r'o'f' 'c'i'' made'g'o'l''''' '?'''''''''''''''s'd'i''''''-' ''k' 'h't'i'w' 'e'n'i'''''''''' 'e'r'a'w't'f'o's''''p'f' ''e'M''''M''''''''''''t'a' 'k'o' 'm'''''''''''''''''''''''''''''s'd'i'k' 'd'n''''k'i'm' 't'''n'o'd' 'I' '?'e'm' 't'u'B''''''''''''''''''''''''''''e'n' 'y'm' 'h't'i'w' 'h'g'u'o'n'e' 'l'l'e'w' 'o'd' 'I' 'e'h'T' '.'*'h't'a'm'*' 'e'k'i'''''''e'd'a'm' '''''''''''''''''' 'e'd'i's'n'i''''' the'''''''e''''''''''''''''' 's'T'D'R'C' 't's'a'f' 'f'o'h't' ''.'r'o'f' ''''''' I''n th''''''''''''''''''''','e's'a'c' 's'i'h't' 'n'I' '''''''''''h't' 'n'I' '.'g'n'i'k'o'o'l' 'o'g''''o'''l' 'd'e't'a'c'i'l'p'm'''o'c' 'y'l'''n'''''''''''''''''''''''''''''''d'l'r'o'w' 'e'h't' 'r'o'f' 's'T'D'R'C' 't's'a'f' 'r'e'p'u's' ''o' 's'''''''' a'''''a' 'e'd'a'm' 'I'''' 't'i' 't'u'B' '''?'o'g' 'd'l'u'o'h's' 'm'e't''''''h'c'''''''h'v'i'h'w' ''i' 'w'e'n' 'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'S' ''''''''''''e'w' '''''''''''''' 'n'e'h'w' ''.'t''''c''''f'i'c'''''''''''''''''''''''t'a'h't' 'e'k'i'l' 'g'n'i'h't'e'm'o's' 'r'o' ''i'l'p'm'i' 's'i' 's't'n'e'm'e'''''s'j'Y' '''''''n'n''''s'l'e' 'l'a'n'r'e't'n'i' 'e'h't' 'f'o' 's't'n'e'r'a'p' 'd'n'a' 'q'e's' ','d'''''e's'e'''''''''''''''''''''''''''''''''''''''''''''''''''p''''''''r'u'o' 'n'I'n'n''''u' 'e'n'i'l' '''''''i'l't'''n'o'w' '''' 's'r'e'b'm'u'n'''''''''''''''n'o'w' 'r's'e'b'm'u'n' 'e'c'n'e'u'q'e's' 'd'n'a' 'd'i' 'e'h't' 'e'c'n'i's' '-' 'h't''i''''p' 'e'h't' 't'u'b' '-' 'e'v'o'b'a' 'n'o'i's'r'e'v' 'd'e'd'n'a'p'x'e' 'e'h't' 'o't' 't'n'e'l'a'v'i'u'q'e''''''''''''''''s' 'e'h't' 's'i' 's'i'h't' 'y'l'l'a'c'i't'n'a'm'e'S'n'n''''''''''''''''''''''''''''''''''''''' truly'''d'n'a''I''' ''''''I''n'n'' 'e'r'a'r' '''''''' 'y'l'u'r't''''''''.'n'e'd'l'o'g' 'e'r'a' 's'i'h't' 'o'd' 'h'c'i'h'w' 's'a'e'd'I'''''''''''''''e'a'd'i' 'e's'e'h'T' '.'''' '''''''''''''''''''''''''''''''''''''''''''u'o'y' 's'e'k'a'm' 't'a'h't' 'a'e'd'i' 'f'o' 'd'n'i'k''' 'e'h't' 's'i' 'h'c'i'h'w' ',''''''''''''''''''''''''r'i'e't'n'o'r'f' 'e'h't' 'g'n'i'v'o'M' '.''''''''''''''''''''''s'y'a's' 'n'i'v'e'K''''''' 'I''w' '-' ''''''''''''''''''''''''''''''''''''' 't'u'o' 'e'r'u'g'i'f' '''''''''''''''''''''''''''''.'''''t's'a'f' 'o's' 'n'u'r' 'e'd'o'c' 's'i'h't' 'e'k'a'm'''''''''''''''s'a'f' 'e'h't' 'd'n'i'f' '''''''''''''''''''''''''''''n'o'i't'r'e's'n'i' 'r'u'o'y'''''s'e'o'''d' '' 't'u'o' 'g'n'i'p'p'a'w''''''''''p'p'a's''''''''''''''''''''''''''''''''''''.'n'o'i't'c'n'u'f' 'n'o'i't'r'e's'n'i'''''''''''''e't'n'i' 'r'u'o'y' 'g'''''i''' 'o'S'''' ''I'n'i'g'n''''''''''''''''''t's'a'f' 'y'l'l'a'e'r' 's't'i' ','a'h'c' 't's'u'j' 'y'b''''y' 's'n'o'i't'a't'n'e'm'e'l'p'''''''e'l'm'i' 'p'a'w's' ')'y'l't's'o'm'(' ''''')'M'T'(' ''n'''' We implement a list CRDT with a list. Genius!'a'c' 'u'o'Y''''''''''''' 'r'o'F''''d'e'd'i's'-'y'b'-'e'd'i's' 'h't' 'e'r'e'h'w' 't'u'o' 'e'''r'u'g'i'f' 'u'o'y' 'o'd' 'w'o'h''''' '''''''''''''''''''''''''''''''''''s'''e'h'''''''''''''''''''''''''''''''w'o'n' 's'''e'H' '.'n'r'u't' 'n'i' 'h'c'a'o'r''''''''''''''''''''''''''''''''''''''''''.'e'c'n'a'm'r'''''''a'r'o'f'r'e'p' 'n'i' 'e'm' 't'a'e'b' 'n'a'c' 'e'h' 'f'i' 'e'e's' 'o't''''''' 'h'c'i'h'w' 'p'p'a' 'y'm'' '''''d'n'a' ','o'o't' 'w'o'n' 's'i'h''''''''''''''''''''''''''''''''''''''''''s'r'e't'n'i'o'p' 'y'b' 'd'''' '''' 'e't'a'r'a'p'e's' 's't'r'a'p' 'e'h't' 'l'l'a' 'h't'i'w' 't' 's'w'o'n'k' ''-' 't't'e'r'p''h'w' ',''''.'''''''n'a'c' 'u'o''''''''''''''''''' 'e''''r'u't'c'u'r't's' 'a't'a'd'Y''''''''''''''''''' 's'a'h' 'd'l'e'i'f' 'e'h't' 'n'i'''n'a'c' 'e'W' ''''''''''''''''''''''''s'e'o'd' 'e'g'r'e'm'o't'u'a' ''''''''''''' 's't'e'L' 'f' 'nn> You can't make a program faster. You can only make it do less work.n'''n''''i't' 'e'h't' 't'a'o'i't'a't'n'e'm'e'l'p'm'i'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e's'u'a'c''''' 't'a'l'f''e'b' 't's'a'f' 'e'd'o'c' 't'p'i'r'c's'a'v'a'j' 'e'h't' 'g'n'i'k'a'm' 'd'e'r'e'h't'o'b' 't'''n'e'v'a'h' 'y'e'h't' 'e'm'i't'n'a'e'm' 'e'h't' 'n'i' 'd'n'A' ' 'n'e'm'e'c'a'l'p'e'r'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'e'y' 'd'e'g'r''' '''''''''''''''''''''''''''''''''''h''' 't'u'b' ','e'l'p'm'i's' 's'k'o'o'l' 't'a'h'T'''''''''''''''':'y's'a'e' 's't'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'h't' 'n'i' 'n'o'i't'a''3.'''(' Traverse up through the tree to figure out the insert position of the new'''''''''''' update'' o''''''' 'l'a'u't'c'a'ur copy ''''''''''''''Y''''''.'''''''''' '/' 'r'o't'i'd'e' 'r'u'o'y' 'n'i' 'of the document. (Automerge also sto'''''''''' 'd'd'a' '''n'a'c' 'u'o'y' 'o's' ' item, and update our copy of the document. (Automerge also sto'''''''''''''''''''''''''h'g'u'o'r'h't' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'B'''''')'s'c'i't'n'a'm'e's' 'e'h't' 'g'n'i'''''''''''''''''''''''' 's'j'y' 'r'o' 'e'g'r'e'm'o't'u'a' 'r'''''''''''''''n'o'i't'c'n'u'f' 't'r'e's'n'i''o'f' ''t'a'l's'n'a'r't' 'y'r'i'a'h' 't'i'b' 'a' 's'i'''''''i's' 't'i' 'd'n'a'''''''t'i' 'd'n'A'(' ''''''''''''''''''''''''''''''''pretty''''''''''''' 'f'o' 's'''''''''''''''''''''''s'n'o's'a'e'r' 'f'o's' 't'o'l' 'r'o'f' ' '''''''''''''''''''''l'u'f'i't'u'a'e'b' 'y't't'e'r'p' 's'i' 'h'c'a'o'r'p'p'a' 's'i'h'T'''''''''''''''''''''''''''''''''''''''''''''''o't's' 'o's'l'a' 'e'g'r'e'm'o't'u'A'(' '.'t'n'e'm'u'c'o'd' 'e'h't' 'f'o' 'y'p'o'c' 'r'u'o' '''''''''''''''''e't'a'd'p'u' 'd'n'a' ','m'e't'i' 'w'e'n' 'e'''''''e''''e' 'h't' 'f'o' 'n'o'i't'i's'o'p' 't'r'e's'n'i' 'e'h't''''''' 'e'r'e'h'w' 't'u'o' 'e'r'u'g'i'f' 'o't' 'e'e'r't' 'e'h't' 'p'u'''''''a'w'k'c'a'b'''''''''e'e'r't' 'e'h't' 'e's'r'e'v'a'r'T''''S'''h'U' '.'3'n''''.''c'o'''''s'j'y''''''''''j'y't' 'l' 't'h'g'i'r'''''''''' slightly''H''Th'''''''''p'e'e'K'(' '.'''''''''''''''''''''''''.'d'e't'r'o's' 'm'''''r'o's' '''''' 'e'r'e'h'w''e'h't' 'g'n'i'p'e'e'k''I''''''''!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''''''''''''''''''''''''''''.'e'r'e'h't' 't'''''''''''''''''''''''''t'u'o'b'a'''''''d'n'a' ','' 's'i' 'h'c'a'o'r'p'p'a' 's'i'h'T'h'g'i'r' ','l'i'a'r'g' 'y'l'o'H''''''' 's't'I'''''''''''''''''''h''' 'e'h't' 's'y'a'w':''l''':''a''''''''''''l'a'w' 's't'a'h'T''''''''''''.'l'i'a'r'g' 'y'l'o'H' '.'r'e'l'p'm'i's' '*'d'n'a'*' 'r'e't's'a'f' 's't'I' '.'5'n'h'c'a'o'r'p'p'a' 's'i'h't' ','y'l'''''''''''''''''''''''''''''''''''''y''' 't'u'b' ','d'e'''''''''''S' ':'e't'o'N' '>''t'a'c'i'l'p'm'o'c' '''e's'f'o' 't'r'o's' 's'd'n'u'o's'''''''''''''''''''''''''' 'n'i'''''''Some of these performance i''''''''''''''''s''''''''' 'y'l'b'a'b'o'r'p'''''''''''''''''''''''''.'''e'c'n'a'm'r'o'f'r'e'p''W'''''''''' 't'a'h't''''''''''''''' 't'c'e'r'''''''''''''''''''''''''''''''''''''''''''''''I' '.'*'t's'a'f'*'''''g'i'b' ' 't'o'''''''''''''''''''''''''''''m'h't'i'r'o'g'l'a' 's'i'h't' 'n'i' 's'k'c'e'n'e'l't't'o'b''n' 'l'l':''''''''.''''W''i't's' ''''s's'i' 'n'','o'i't'a't'n'e'm'e'l'p'm'i' 'e'h't' 't'u'b' ','''''''''' ','''r'o'c''''''''''''''''''''''''''''''''''r'u'o' '' 'o't' 'e'm'i't' 's't'i' '''','''''''''''''''''''''''''''''''''''.'''''''''''''''n'o'i't'c'a'r't's'b'a' '/' '''*'t's'a'f'*' 't'o'n' 'l'l'i't's' 's't'i' 't'u'b' ','r'e't'''''''''i'''i' '''''''''y'l'l'a'u't'c'a' '','e'e'S''''T''t'e'b' 's'i' 's'i'h'T'n''n'' 'n'o' 't'c'a'p'm'i''nThis is better, but its still not *fast*.''i''n'''''''''g'n'i''''I'performance''''''''''''''''n'e'l'''''''''''''''''''''''''''''''.'e'c'n'e'r''n'e'e''f'f'i''l'd' 'e'c''''''' 'e'n'a'm'r'o'''f'r'e'''' 'n'e'l''p' 'g'i'b'''''''''''''''''''''''''''''''t'n'e't'n'o'c' ''''.'d'e't'e'l'e'd' '=' 'e'v'i't'a'g'e'n' '/'/' ' 'a' 'e'k'a'm' 'o's'l'a' 'l'l'i'w' 'h'c'i'''''''''r'o'F''h'w' '-' 'e'r'e'h' '''m'''''''''''''''e'r'e'h' '''provements com'''''''''s'i'h't' 'r'o'f' 'e from the fact I'm a'''''''''''''''''''''''' 't's'u'j'''''''''''''''''''''n'n'''''''''''''''''''''a' 'y'l'l'a's'r'e'v'i'n'u''''''' '''''''''''' 'o't' 's'n'o'i't'a'r'e'p'o' 'y'b'r'a'e'n''''''''''''r'e's's''u' 'e'h't' '''''''h't' 't'a''''''''' 'h't''''''''''''''''''.'M'A'R' 's's'e'l'''''''w'o'n' ' 'e's'u' 'e'w' ',''i'w''''''''''''y'e'p'o'r' 'g'n'i's'u' 'o'S'''''''''''''''''''' 's''''''''''''''''''''''''''''''''''''''''''''''''(' ''>'-'''')''''' 'o'S'''g'i'b' 's'a' 'e'c'i'w't' 'e'l'd'n'u'b' 'm's'a'w' 'e'h't' 's'e'k'a'm' 't'i' 'd'n'a' ','''a'''''',' 'e'c'i'w't' 'n'a'h't' 'e'r'o'm''''''''''x'+'2'''''''''''''''' 'e'r'o'm' 'k'o'o'l' 'a' 'e'k'a't'''''''''''''''''''''''''''''''''''''''''.'m'e'.''''t'i' 'w'e'n' 'e''''i'h't' 'f'o' 't'n'e''''''''''''''''''s'i'h't' 's'e'o'd' 'e'''''''d' 'd'o'c' 'e'h't''r''t'a'p' 'e'h't' 't'u'o' 'e'''' '''''''''''''''' 't'u'o'e'r'u'g'i'f' 'o't' 'd'e'e'n' 'o's'l'a' 'e'W' '.'''lso not us'''''''''''''''''''''m'e't'i' 'w'e'n' 'e'''''''''''''y'a'r'r'a' 'e'h't' '''''''''''''''e'd'o'c' 'e'v'i't'a'n' 'n'i' ''n'i' ''h't' '*'''''''''''''''''''''''''''''''''''''''''''''''''''y'n'a'm' 'o's''''a'''''''''''''''''''s'm'''''''':'e'd'i's'A''''''''''t'a'h''''''''''''''''''''''''''''''''''''''t'n'e'm'u'c'o''''''''''e'k'a't' 'l''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e'v'o'm'e'r' 'y'l'l'a'e'r' 't'''n'e'r'a' 's'm'e't'i' 'd'e't'e'l'''''''''''''*'*'''''''''s'p'e't's' 'n' 'e'k'a't' 'l'l'i'w' '''e'd' 'e's'u'a'c''''''''''''''''''''''''''i''' ','n'*'*'''o'i''''''''''''''''''''''''''''''''''''''w'o'n' 's't'i' 't'u'b' ',''''s's's'e'l'e's'u' 'f'o' 'd'n'i'k' ''''''''''''''''''''''''''''''''''''''''''''''''''' 's'i'h't' 'h't'i'w'''''''''''''''''''''''.'e'r'a'p's' 'o't' 'U'P'C' 'e'v'a'h' 'd'n'a' 'n'o'i't'c'e'n'n'o'c' 't'e'n'r'e't'n'i' 'y'm' 'e't'a'r'u't'a's' 'd'l'u'o'c' 'I''''''''''''''''''''''''''''''''''''''''''''s'e't'a'd'p'u' ''''''' 'u'e'e'r't'-'''''''''''''' 'e'r'''''''''''''''''''''''''o't' 'n'w'o'd' 's'm'5'6'''''''4'5' 't'a'h't' 's'g'n'i'r'b' '''''''''''''''''''''' 's'g'n'i'r'b''''u't'u'f' 'y'm' 'n'i''''''''''''''''''k'r'''''t's'u'j' ''o'w' 'd'l'u'o'h's' 'h'c'i'h'w' '''''''''''''c'i'h'w''''b' 'e'h't''''b' 'g'n'i'v'a'e'l'r'e't'n'i' 'y'b' ''''''''''''''' 'e't'a'r'u't'a's' 'd'l'u'o'c' 's'i'h'T''''s't'I''This is''''''''''''''''''''''''''s't'i'd'e' 's's'e'c'o'r'p' 'n'a'c' 'I's'i' 's'i'h'T' 't'a'''''''''''''''''''''''''n'o'i't'c'e'n'n'o'c' 't'e'n'r'e't'n'i' 'y'm't'o'''n' 'O'-'g''''*'''i''n'B''*' 'n'I''u'a'e''''''''''''''''''''''''''''''!''''''''''''''t' 'd'e'e'n' 'e'W'n'a'c' 'e'w' 's'e'Y' '?'s'i'h't' 'x'i'f' 'e'w' 'n'a'C'n''n'b' ''''I'''''''g'n'i'.'t'a'h't' 'n'a'h't' 'e's'r''*'''o'w' '*''s't'''i''' ','e'p'o'N'l'i'w' '', the computer does about *n* steps'''' ''''d' 'a' 'o't'n'i'''''''''k'a't' 'l'l'i'w' 'm'e't'i' 'n'a' 'g'n'i'''' 't'r'e's'n'I'n'n't''''''''''''''''''''''''''''''''''''''''''''*'*'''''''''s'm'e't'i' 'n' 'h't'i''*'*''w' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'W''''''d'n'u'o'r'a' 's'm'e't''''''''''''t'n'e'v'n'i' 'o't' ''i' 'g'n'i't's'i'x'e' 'e'h''''''''''''''''''''''''''allow inse'''''''''''''''''''''''''''''e'''m''''''''s'd'd'a' '''''''i''' ','l'l'e'W''i't'''''g'n'i'h't'' ')'1'('O' 'n'i' 'e'l'd'd'i'm' 'e'h't' 'n'i' 's't'r''c''''''''''''r'e's'n'i' 'w'o'l'l'a' 's't's'i'l' 'd'e'k'n'i'l' 'e's'u'a'c'e'b' '-' 't' 'l'l'a' 'g'n'i'y'p'o'c''''''''' 'g'n'i'd'i'l's' 't'u'o'h't'i'w' ','''''''''''''''''''''''''''''''e'v'a'h' 'e'r'''''''''' 's'm'e't'i' '*''''''''''''''''''''''''''''''''''''''''''''''''d'e'v'''''''''''m'h't'i'r'o'g'l'a' 'o'm'e'r' 'y'l'l'a'e'r' 'r'' '''e'v'e'n' 'e'r'a' 's'm'e't'i' 'd'e't'e'l'e'd' 'e's'u'a'c'e'b' ',''''''''''D' '.'''''''''''''''d' '-' ''n'*''e'h't' 'e'r'e'h'w' 't'n'e'm'u'c'o'd' 'a' 'o't'n'i' 't'r'e's'n'i' 'e'w' 'e'm'i't''''''''''''''''''' ')'s'T'D'R'C' 't's'a'f' ''''''' 'e'v'a''''''S' '''' ''h' '''r'''e'p'u's'('' 'y'r'e'v''''e'e''''''''''''k'''''''f''''''''t'x'e'n' ' 'h'a'a'A'''r'o'w' 'f'o' 's'p'e't's' 'n'''t''''''w''''''''''''''y'l'e't'a'n'u't'r'o'f'n'u' '''' 'e't'o'N''n'e'm'u'c'o'd' 'a' 'o't'n'i' ''''''''''''s't'r'e's'n'i't''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t''n'n''''n'e'm't'r'a'p'a' 'y'm' 'o't'n'i' 'g'''' 'n'i'm'o'c' 't''''''o'''''''k'o'o'l' ''!'''' 'd'n'A'e'n'r'e'h't'e' ''''''''''''l' 't'I''r'e'b'i'f' 'e'h't' 'n'a'h't' 'r'e''''''''''''''''''''''''''''''h' 'y'm' 't'a'h't''''''' 'e'b'''''''''''''''''''''''''''''''.'t'e'n'r'e'h't'e' 't'i''*'b''*'a'g'e'm' '0'0'1'''''''e'm''''' '''''''b'm'0'0'1' 'e't'a'r'u't'a's' 'o't' 'h'g'u'o'n'e' 't's'a'f' 's'i' 's'i'h'T' '''''''''''''''''p'u' 'e'n'i''y'''''''''''''''''''''''''''''o't' 'd'e'e'n' 's'e'm'i't'e'm'o's' 'o's'''l'a' 'l'l'''e'W''T'l'''''''''''''''r'u'o' 'f''''''''''''''''''''''''''a't'a'd' 'k'r'a'm'h'c'n'e'b' 's'i'h't' 'h't'i'w' ','' in Mart''in's edi''''''''''''''''''''''''''''''s'c'i't'n'a'm'e's' 't'n'e'm'u'c'o'd' 'f'o' 'd'a'e't's'n'i' '''ting trace''''o' 'e'n'o'''''''''''''''''''''''''s'j'Y' '?'w'''''''''''''s'e''''s's'u' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'e's'u' 'y'l'n'o' 't'i' 'd'n'a' ','n'o'i't'a't'n'e'm'e'l'p'm'i' 's't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'e'h't' 'n'a'h't' ':':'''o'n''' ''':''''t'i' 's'i' ':''''t's'a'f' 'w'o'H'' 'l''''''o's'l'a' ''''''''e'r'a''''''''p'u' 'e'n'i'l' ''''''''''m'e't'i' 'e'l'g'n'i's' 'a' 'o't'n'i' ''r'e's'n''' 'o'S''i'''''''''''''3''''2'''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''l'a'i'''''''''''''' 'y'l't's'e'''''''''''''''''''''''''''f'o' 's'u'o'i'c'i'p's'u's' 'e'l't't'i'l' 'a' 'd'n'a' ''n'o'H'''''''e'd's''o''''''''''y'k'c'i'r't' 'c' 'e'h't''''''''''''''''''''''''''''''''have been'''''e'r'e'w''''''2'''''''''''''''''''''h'c'u'm' ''''''''''''''''''''''''!''''''c''' 't'u'B''C''''''c'''''''y'''''''''' ' doubt'''''''''''''''' 'e'r'u'p'''''''''''''''''''''''g'n'i'n'n'u'''''''''''''''''''e'k'a't's'i'm' 'a' 's'a'w' 't'a'h'T'r' 't'u'o'''''b'a' 's'u'o'v'r'e'n' 'm''''''''''''''''''''''''e'k''''''' 'e'r'u'P'''''e'a'm' '''n'''a'c'''''''''''''''''''''''''''d'i'd' 'n'i'v'e'K' 'n'a'h't' 'r'e't's'a'f' 'y'n'a' ' 'I' 't'b'u'o'd'y'l't's'e'n'o'H'a'w'y'n'a' '''' 't'u'B''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!'e'v'i's's'e'r'p'm'i' 'r'e'p'u's' 's't'I''''''''''r'e'p'u's' 's'T'I' '''' '.'l'l'e'w' 'o''!'s' 'k'r'o'w' ''''''''''''''t's'a'f' 't'a'h't' 'o'g' 't'i' 'e'k'a'm' 'o't' 'r'e'd'r'o' 'n'i' 's'e'm''''''''''s'e'v'i't' '''''''''''''''o't' 'e'v'i'g' 'n'a'c' 'e'w' ''1'1' 't'u'o'b'a''(''''('''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'''''s'')'T'D'R'C''k'a''''''''''!'''k'e'm' 'n'a'c' 'I' 't's'a'f' 'w''''s'o'h' 't'u'o' 'k'c'e'h'c' 't'u'b' ','t'a'e'r'g' '''''''''h' 'd'n'a' ',''''''s'''''''''''' 'd'n'A''''t'''a'h'T''''' ''''''''''''''''''''''''''''''''''t'u'b' ','y't'i'x'e'l'p'm'o'c' 'd'd'a' 'd'l'u'o'w' 't'I'n'a''e'''''''''''g'n'i'h't'e'm'o's''c''''' ''?'e'M''''''''''''''' 'g'n'i''''''''''''''''t's'a'f' 'y'l'l'a'e'r' 'o'g''''o''''o' 'k'a'm''' ''''''''''''e'r'a'w't'f'o's' ''''''''''''''''''''''''''''''''''s'i'h'''''t's'a'f' ''''''''''''''''''''''''''''h'c'u'm' ''''''''''''''''''''''''''d'n'a' 'y's'u'b'''''''b'''''''u'b's' 's'a'w' 'I' ','''k'''''' 'r'o'w' 't'a'h't' 'g'n'i'o'd'''''''''g'n'i'''''''''''''''''''k'c'a'b' 't'i' 'g'n'i'r'b'''''''''''''d''' '''l'a'c'i't'c'a'r'P' ' 'd'n'a' 'r'e't'' '''''''n'n'''n'e' 'f'o' 'd'a'e't's'n'I'''t''' 'e''''''''''''' 'g'n'i'k'a'm''''''''''''''''''g'n'i'n'u't' 'e'c'n'a'm'r'o'f'r'e'p' 'e'r'a'w't'f'o's' 't'u'o'b'a' 'g'n'i'k'n'i'h't'''''''b'o'''''''''''''.'e'c'n'a'm'r'o'f'r'e'p' 'e'k'i'''''''k'o'l' ''''''I' '.'s't'n'e'r'a'p' 't'a'e'r'g' 'e'r'a' 'e'l'p'o'e'p' 'e'm'o'S' '' 'n'e't't'i'r'w'e'r' 'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'r'e't's'a'f' 'n''*'e'v''*'e' 'e'm'o'c'e'b' 'd'l'u'o'h's'''''' 'l'l'i'w' 't'i' 'n'o'o's''''''''a'u't'n'e'v'e' 'd'n'a' 't's'a'f' 's'n'u'r' 'y'd'a'e'r'l'a' 's'j'Y' ''e'e'b' 'e'v'a'h' 's'j'y' 'f'o' 's't'r'a'p' 'e'm'o's' 'y'l't'n'e'r'a'p'p'''''' '>'''''''''''''''''''''''''''' 'e'r'e'h' 'e's'n'e't' 't's'a'p' 'e'h't' 'e's'''''''''''''''''''''.'s'i'h't' 't'o'g' 's'a'h' 'n'i'v'e'K' 'u'''''''''''''''https://github.com/yjs/y-crd'''''''''''' 'n'w'o' ''''''''''')'!''''''''''''''''''' 't'a'''''''''' 't'a'h't' 's'j'Y' 'f'o' '''''''''''''''''''''''''''''''''''''''.'T'O' 'f'o''''p' 'p'o't' 'n'o' 'f'f'u't's' 's'i'h't' 's'e'o'd' 'h'c'i'h'w' ','''s'i'h''''''''''''t'r'o'p' '''''''''''''''''''''''''''e'r'u's'a'e'm' 'e'c'n'a'm'r'o'f'''''''f'o'r'e'p' 'r'e'''''''''''''w'o'h' 'h't'o' 't's'u'r' 'a' '-' ')'t'(']'s'r'Y'['''''''''''''''''''''''''''''''''''''''''''''''e'v'a'h' 's'n'o'i't'a'c'i'l'p'p'''''''''''''''''''''''''s't'c'e'j'b'o' 'e's'o'h't''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'o' 'e's'a'b'''''','' 'a't'a'd' 'a''''''' ''''''' 'a'd' 'n'i' 't'c'e'j'b'o' 'e'l'g'n'i's' 'a' 'e't'a'd'p'u' 'o't' 't'n'a'w' 'u'o'y' 'f'I'n'n'''' ' 'h'c'a'E' '.''''a'''e'w' 'y'l'l'a'u's'U''''''''''''''''''''''''''''''''''''''' 'n'o' 'g'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'p'p'a' 't's'o'''''''''''''''''''''''''''''''''''''''''''''''''''''''''o' ''''''n''''j'''''''''n'n''''t' 'n'e't't'i'r'w' 'y'l'e'r'a'r' 'y'r'e'v'''''''''''''r'e'v'e'n' 't's'o'm'l'a' 's'i' 'h'c'i'h'w' 'f'o' 'h'c'a'e' ','s't'c'e'j'b'o' 'y'n'i't' 'f'o' '''''.'m'''''''''''''''''''''''''''''''''s'i'h't' 'n'a'h't' '''l'l'u'f' 's'e''''''''''''' 'n'o' 'g'n'i'k'r'o'w''s'a'b'a't'a'd'''''''''d'a' 'e'v'a'h' ''''t'a' 'y''''''e'r'e'h' 'e'h't' 'd'a'e't's''''''''''a'e't'n'I' '.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Holy cow, automerge's javascript is really slow!'''h'W'''''e'v'a's''''e' 'n'e'h't' 'd'n'a' 'n'e'p'o' 'p'e'e'k' ','e'c'n'o' 'd'a'o'l' 'n'a'c' 'u'o'y''''l' 't'n'e'm'u'c'o'd' 'e'n'o' 's'''e'r'e'h't' 'e'r'e'h'w' ',''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'o't' 'n'e't't'i'r'w' 'y'l'e'r'a'r'''''' 'h'c'a'e' 'e'r'a' 'h'c'i'h'w' 's't'c'e'j'b'o' 'l'l'a'm's' 'f'o' 's't'o'l' 'e'v'a'h' 's'p'p'a''''''s'p'p'a'a' 't's'o'M' '''' '.'s'r'o't'i'''''''i't'd'e' 't'x'e't' 'e'v'i't'a'r'o'b'a'l'l'o'c' 't'''''' 'n'e'r'a' 's'n'o'i't'a'c'i'l'p'''p'a' 't's'o'M' ''n'''''''''''''''''''''''''''''''''''f'o'''s'' 'l'l'u'f''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n''''''''''''''''''''''''''''''''''''''''''':'o't' 'd'e'e'n' 'u'o'y' 'y'a'd'o't' 'e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'y' 'h't'i'W' '.'y'l'k'c'i'u'q' 'm'''''''''''''''''''''''''''''''''''''''' ','w'o'l's' 'y'l'l'u'f'''''''f'u'w'a' 'e'b' 'o't' 'g'n'i'o'g' 's'i' 's'i'h'T'n'e'''''''e'm't'i' 'e'l'g'n'i's' 'a' 'e't'a'd'p'u' 'o't' 'e'l'b'a' 'e'b' 'o't' 't'n'a'w' 'I'' 'e's'a'b'''' 'a't'a'd' 'e'l'o'h'w' ' ':'s'w'e'n' 'd'a'B''i'k'r'o'w''''''''''k'r'o' 'd'n'a' ','k''''''''''''''''''''''''''''''''''''''l'g' 'w''''''h'c'i'h'w' ''''e'f' 'a' 'e'd'a'm' 'e'v'''I' '.'w'o'n'k' 'I' ','s'e'Y'c'a'b' 't'h'g'i'r' 'e'm' 'g'n'i'y'p'o'c' 's'i''''h' 'n'i'v'e'K' 'e's'u'a'c'e'b' '*'w''''w'e'n'k''''n'*' 'y'a''''''''''y'a'w's''''k' 'I'('n'n''A' ' ''t''''''' 'n'i'a''''''''''confused''b''''b'''''''''d'e's'u'''''''e'm'o's' ''''f'n'o''''s'i''''g'n'i''' '''c' 'd'n'a' ''g'''Can we still go faster? Yjs is very we'''.'''''''''''n'e't'''f'o' 'l'l'i'w'.'.'ll optimized already, and I ''When I told Kevin that I t''''''''''''''' 'a'''''T'D'R'C''''a' 'e's'''' '''''''''''''''''''''''''''''''''s'e'o'd' 'r'e't'u'p'm'o'c' 'r'u'o'y''''t' 'g'n'i'h't'y'r'e'v'e''' 'y'a'w'''''''s'e'o'g' ''k'a'm' 'd'l'u'o'c'Y'''''''''''''''' 't'''''''''''''''''''''''''t'o'l' 'a' ''' 'l'''''''''''n'''''''''''''''''''''''''''''''''''''''''''Yeah, well spotted. Each of these tests changes multiple variables. Maybe my reference implementation is faster than automerge simply''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'l'p'm'i's' 'e'g'r'e'm'o't'u'a' 'n'a'h't' 'r'e't's'a'f' 's'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'c'n'e'r'e'f'e'r''''d' 'y'm' 'e'b'y'a'M' '.'s'e'l'b'a'i'r'a''''e'v' 'e'l'p'i't'l'u'm' 's'e'g'n'a'h'c' 's't's'e't' 'e's'e'h't' 'f'o' 'h'c'a'E' '.'d'e't't'o'p's' 'l'l'e'w' ','h'a'e'Y'g'n'i'g'n'a'h'c' 's'e'l'b'a'i'r'a'v' 'y'n'a'm' 'o'o't' 'e'v'a'h' 'u'o'Y'''''''''''''''''' 't'''n's'e'o'd' 's'i'h'T' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n's'e'g'n'a'h'c' 'e'l'p'i'''''''p'i't'l'u'm' 'm'o'r'f' 't'l'u's'e'r''''e' 'e'h't' 'w'o'h's' 's'k'r'a'm'h'c'n'e'b' 'e's''''''' 'e'e'h't' 'f'o' 'l'l'A'''''''n'o' '#'#'#'n'n'''''t'i'b' 'e'l't't'i'l' 'a' ''l'e'A''w''''''''''''''''''''''''''''y'l'b'a'''b'o'r'p''''''''''''''''''''''''o't' 'e's'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''s'i'''a' 'n'o' 'e't'o'n' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'O''''Y''''''e's'u'o'h' 'r'u'o'y' 'n'i' 'e'r'e'h'w'e'm'o's' 's'e'm'L''a'n' 't's'i'l' 'g'n'i'p''m'''''p'''o'h's' 'r'u'o'y' 'n'o' 'm'e't'i' 'h'c'a'''E'''''''''''''''''''''''g'''''''''''''''s'e'g'a' ''n'i'k'a'e'p's' 'y'l'e'v'i't'a'l'e''''''''''''''''''''''''''''''''''''''''''o'g' 'e'n'o' 'n'i' 'l'''l'a' 't'i''''''''''''''''''''''''''''''''''''''''d'l'r'o'w' 'l'a'e'r' 'e'h't' 'n'i' 'd'e's'u' 'r'e'v'e'n''' '''''' '''''t's'o'm'l'a' 'e'r'a' '' 'h'c't'e'f' '''''''''e's'u'a'c'e'b' 'n'a'c''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e's'o'h't''''''''''''''''.'''d'l'r'o'w' '''''''''''''''''''f''' 'h't'i'w' 'm'e'l'b'o'r'p' 'e'h''''''''''''''''''' 'p''''g'n'i'u' 'd'n'e' 'u'o'y' 't'a'h't' 's'i''T'l'a'e'r' 'e'h't' 'n'i' 'e'c'n'a'm'r'''o'f'r'e'p' 's'n'i'u'r'''''''''''''''''''''''''''''' 'k'r'o'w' 't'a'h't' 'l'l'a' 'f'o'''''''''''''''''''''''''''''''''''g'n'i'n'''''''y'a'w'y'n'a''''''''''''''''''''''''''''''''''''''''''''r'e't's'a'f' 'y'n'a' 'n'e't't'o'g' 'y'l'l'a'e'r' ''''''''''''''''''n'i' 'r'e't's'a'f' 'n'e't't'o'g' 't'''n's''''n'a'h' 't'i' 'y'h'w' 'd'n'a' ','' ''n'u'r' 'p'u' 'd'n'e' 'n'e't'f'o' 's'm'a'r'g'o'r'p' 'r'u'o'y' 't'l'u's'e'r' 'a' 's'a'''''''u's' 'n'o'i't'a't'n'e'm'g'a'r'f' 'y'r'o'm'e'm' '-' 't'i''''u' 's'i' 's'i'h't' 'd'n'a' ' 'r'e't'u'p'm'o'c' ''''''''''''''''u'p'm'o'c'e'h't'r'(''''''''''''''''''')'r'e't'u'p'm'o'c' 'r'u'o'y' 'r'o'f' '''''''''''''''''''''''''''''''''''''''''''''' '''f'o' ''''''s'n'a'p's' ''''k'n'u'h'c' ''''''''''''''''''''''''''''''y'''r'o'm'e'm' 'n'i' 's'u'o'u'g'i't'''''''i'g'n'o'c' 'l'l'a' ',''a'''''''''''''''''''''''''''''a' ',''''')'!'(' 's't'r'e's'n'i' 'f'o' 's'n'a'p's' '2'3' 'e'r'o't's' 'e'w'''''''''' 'w'e' ','f'a'e'l' 'h'c'a'e''''l' 't'a' 'd'n'A' ''''u'o'y''''''''''''e'm'a'n' 'e'h'''''' 't'u'o'b'a''T''y'l''''''''''''''''''''''y'u'b' 'o't' 'd'e'e'n' 'u'o'y' 'g'''' 'n'i'h't'n'o' '''''''r'e't'f'a' ','''''''''''''''''''''''''''' ','''d'a'e'r'''''''''''''''''''f'o' 's'e'i'r'e's''s' 'a' 's'''t's'i'l''''''''''s'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'i'f' 'u'o''''''''''''''''''''''''''''d'e'e'n'''''''''''''''''o's'l'a' '''' '' 'u'o'y' 's'y'a's' 'y'l'l'a'u't'c'a' 'h'c'i'h'''''''w''y' 'l'''''s'e'g'a' ''l'i'w' 'e'r'e'h't' 'd'n'u'o'r'a' 'h'c'r'''''''''''''''''''''''''''''' 'd'e'k'c'a'p''''''''y'a'r'r'a' '''''''''''''''''''''e'd'o'''n'''''''''''n'i' 't'l'u's'e'r' ''' 'f'a'e'l' 'h'c'a'e' 'n'i' 'e'n'i'l'n'i' 'n'a' 'g'n'i'r'o't's' 'm'''I'''a'e's'''''''s''''''''''''''''''''''''''t'a'e'b't'r'a'e'h' '''''''' 'c'i'p'e' ''r'e'p' 's'e't'y'b' 'w'e'f' 'a't'i' ''''''''''''''''''''''''''''''''''''''' ''''''''''d'e's's'e'r'd'd'a'o''''''''''''''''''''''''''''''''''''''''''''''' 'y'l't's'o'm''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'e'v'e'r'o'f' ','d'n'u'o'b' 't'u'o'h't'i'w' 'w'o'r'g' 's'o'p'e'r' 't'i'g' 'r'i'e'h't' 't'a'h't' 'e'r'a'c' 'o't' 's'm'e'e's' 'y'd'o'b'o'n' '-' '''''''''''''''''''''''''''''''''''''l''' ','h's'o'G''''''''''''''''''''.'h'c'u'm' 'o'o't' 'd'n'i'm' 'o't' 's'm'e'e's' 'y'd'o'b'o'N' ''s'e'o'd' 't'i'g' 'e'k'i'l' 't'i' 'e'r'o'n'g'i' 't's'u'j' 'd'l'u'o'c' 'u'o'y'''''''''''''''''''''''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''''g'n'i'h't'y'r'e'v'e' 'o't' '''' 'l'a'n'o'g'o'h't'r'o' 's't'a'h't' 't'u'B'n'n'.''e'r'a'c' 'y'd'o'b'o'n' 'd'n'a' 'r'e'v'e'r'o'f' 's'w'o'r'g' '')'t'i'G''''g' 'g'e'(' 'd'e'r'o'n'g'i' 'r'O' ''''''''''''''' 'd'e'd'n'''''''' '5''''e'h't''r'o'f''e'm'm'o'c'e'r' 'y'l'''''''''''''''''''e'v'i't'a'r'o'b'a'l'''l'o'c''' 't'''''''l't'n'e'r''''e'r'''''-' '''u'''c''''''''''''''''''y''' 't'a'h't' 'w'o'l'f'k'r'o'w' 'e''''''''''''''''''''''h''''' 'r'u'o'''''''r'u'y' 'e's'u' 'd'l'u'o'c' 'e'W'''''''''''''!'e's'a'e'l'p' ''''!'p'l'e'H' '.'''h't''''s' 's'i' 's'i'h'T'''t' 'd'e's'o'p'p'o' 's'a' ','''d'''''r'o'w' 'r'e'p' ''''''''n''' 's't'I'''''''''''''''''''''''''''''''''''''''''''''''''''''''''s't's'i'l' 'd'e'k'n'i'l' 's'e's'u' 'y'd'o'b''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a''' '''''t'u'b' ','e's'a'b'a't'a'd' 'a' 'f'o' 'p'o't' 'n'''''''' 't'a' 'l'l'a'o' 'g'n'i'h't' 'f'o' 't'r'o's' 's'i'h't' 'g'n'i'o'd' 'o't' 's'e'h'c'a'o'r'p'''''''''''''a'o'p'r'p'a' 'r'e't't'e'b''''e' 'e'r'a' 'e'''' 'r'e'h'T' ''o'n' 't's'o'm'''''''o'n'l'a' 'y'h'w' 'n'o's'a'e'r' 'a' 's'''e'r'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'*''s'e''*'c'o'r'p' 'n'a'c' 't'I' '.''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'n'o'c'e's' 'y'r'e'v'e' 's'n'o'i't'a'r'e'p'o''''p' 'n'o'i'l'l'i'm' '3'.'4' 't'u'o'b'a' 'r'o' ',''''.'e'g'r'e'm'o't'u'a' 'h't'i'w' 'd'e't'r'a't's' 'e'w' 'e'r'e'h'w''''e'h't' 'n'a'h't' 'r'e't's'a'f' 'x'0'0'5''''''''''0'0'4'4' 's't'a'h'T' ''h'T'''''''''''''''''''d''*'e'k'n'i'l'''''*'' 'y'h'w' 's'i' 's'i'h'T' ''''n'n'n''''''''o's'l'a' ''''''''''''''''''''''y'r'o'm'e'm' 'n'i' 'r'e'h't'e'g'o't' 'l'l'a' 's'i' 'a't'a'd' 'r'u'o' 'o's' '' 'u'o'y' 'n'e'h'w' 'y'l'n'o' 'd'n'a' '-' ''''h' '''B' ','k'l'i'M' ','e's'e'e'h'C'''''''''''''''''''''''''''''''''''''''''''''''''''r'o'''''''''''''''?'''''''s''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'n'a't'r'o'p'm'i' ','''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'k'i'l'''''''''''''''''''''''''''''''''''''''t'doc = { content: [' '''doc '''n '''''''''''' { item: 'hello', isDeleted: false, id: ['seph', 0]' ', seq, parent: null },n'n '[' ':'''''d'l'r'o'w''t'n''''e'u'r't'''''e'k'i'm'''''] }'''e't'n'o'c' '''''''''''''''''''''''''''''''''''''s'''t''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'n'i' 's't'i' 'w'o'N' '.'e'r'o'm'y'n'a' 's'm'e't'''''''''s'i'h't' 'r'o'f''https://crates.io/crates/ropey' ''i' 'f'o' 't's'i''''''' 't'e'y'''''''''''''''''y'l't'n'''''''''''''''s'''t''''''''t'n'e't'n'o'c' ''n'e'm'u'c'o'd' 'e'h't' ''e'i'c'i'f'f'e' '''''' 't'e'l''''''s'm'e't'i' '''e'h't' 'n'i' 'e'v'i'l' 't'''n's'' '''e'''''''''''''''' 'e't'y'b''''''''g'n'i'k'c'a'p''''''''''''''a'c' 'h''''''''''' 's'i'h't' 'e'k'i'l'c'i'h'w''o'd' ''n'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'l't'n'e'r'a'p'p'a'''''''''''''''''''''''''''''e'm'o's''''')'!'e'd'o'c' '''''''''''''''m''' 't'u'B'''''''''''''''''''''''''''''''''y'a'w'y'n'a' ''.'s't'n'e't'n'o'c' 's'''t'n'e'm'u'c'o'd' 'e'h't' 't'u'o'b'a' 'e'r'a'c' ''y'm' 'n'a'h't' 'r'e't'h'g'''''w'o'H''''' 'n'a'c' '?''i't''''''''''''''''''''n'a'h't' 't'n'e'i'c'i'f'f'e' 'e'r'o'm' 'y'a'w' 's't'i'''''T'D'R'C' '-' 't'n'e'm'u'c'o'd' 'e'l'o'h'w' 'e'h't' 'e'r'o't's' 'o't''''''''' 'e'h't' 'r'o'f' 'b'k'0'0'2' 's'e's'u' 'y'l'n'o' 'y'e'p'o'R'(' ''m'u''''''''''''''''d'e'l'l'u'p' 'n'e'e'b' 's'a'h'''''''''''''' 'm'''I' '.''''' 's'i' ''c'o'd' 'e'h''''e't' 'e'c'i't'o'N''''''''''' 'o't' 'r'e's'o'l'c''''''''''e'k'i'l' 'e'r'o'm''''l' 'g'n''''n '''''''''''''''''''''''''''''''n '''n ' ''' '''''''n'''''s''''''''''e'n clients: ['seph', 'mike'],''{''''e'','r'T''R'''''''n'a'c' ''C'e'g'n'n''a'R''''''e'e'' 'W' ''''''''''h'c'u'W''m' '''r''n'''''''' 'n''''g'n'i'e'h'w' ' items: RangeTree {['T'B''''''''''''r''''R''''''''''s'i'h'T' '.''''''''''''''''''''s'e'l'b'u'o'd''''''''''''''''''''''''''e'''- There's a bunch of use cases where we don't''''''''''''''''''''''''''''''''''''''''''''''' 't'''n'o'd' 'e'w''''''''''n'o'd' 'e'r'e'h'w' 's'e's'''''''''''''''''''''''''''''''k'''''''''''''''''''''''''''''''''''!'''s'''w'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'h't'''''''s'''' ''''s'''''''i' '''''''''''''''s'''e'e'r't'-'B' 'o'w't' 'e's'e'h't'''''''' 's'e's'o'h't' 'n'e'e'w't'e'b' 'g'n'i'c'n'u'o'b' 'y'''b''''''' 't's'u'j'''''w' ''.'e'h'c'a'c' 'U'P'C' 'e'h't' 'g'n'i'h's'a'r'h't' 'y'l'b'a'b'o'r'p' 'm'''I''''''''' 's'''e'r'e'h'T''''''''''''''''''''''''t' 'g'n'i'e'e's' 'y'l'b'a'b'o'r'p' 'e'r'''e'W' '''''<''''r''' 'e'e'r''''''''''''''''n'a'h't' 's's'e'l' 's'i''''''h't' 't's'a'l' 'e's'o'h't' 't'a' '''''''''''' 'o't' 't's''''''''''''n'o's'a'e'r' 'e'h'T' '''''''''''''*' 'a' 'l'l'e''*'m's' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''','l'l'a' 'd'n'a' 'e'p'o'r' ','''''''''s'n''m'2'5' 'n'i' 'e'c'a'r't' 's'i'h't' 's's'e'c'o'r'p' 'n'a'c' 'h'c'i'h'w''''''''''''''''''0'2' '*'r'e'h't'o'n'a'*' 'h't'i'w' '''e'r'u't'u'f' 'y'm' 'n'i' ''I''''''''''''''''''a' 'e'k'i'l' 's'k''-''''' ''''o'o'l'''''''''''y't'''''''''n'e'v'e' 'e'v'a'h' 'd'l'u'''o'w'' 't'I''''''''''W''''''''''''''''d'e'd'e'e'n' 'y'l'l'a'e'r'''''''''''''r'e'p''''''''''e'b' 't'h'g'i'm' ''''''''''''''''''''''''''''''''''''''''''i''' '''t'u'b' ','s'r'e'p'a'p' 'c'i'm'e'd'a'c'a' 't'a' 'e'l'b'i'r'''''''b'i'r'e't' 'm''''''''''''''''''''''''''''''''''' 'd'n'a' '''''''''''''s'r'e'h'c'r'a'e's'e'r' '''s'l'l'i''''''''''''''''''''''''''''g'n'i't'i'd'e' 'e'v'i't'a'I''r'o'b'a'l'l'o'c' 'P'2'P'k's' 'y'm''''''''''''''''''''''''''''''''''''t'u'B' '.'s'c'i't'n'''''''''''''''''''''''''t'h'g'i'm''''''''''''''''''''''''''''''''''''g'n'i't'i'd'e' 't'x'e''''''''''''''''' ','d'r'o'c'e'r' 'e'h't' 'r'o'F't' 'r'o'f' ''e't''''''''''''''''''''''''''''l'l'a' 'o'd' '''''''''''''''''''''''''''''''''''''' '.'s'a'm'r'a'''''''''''''e'h'T''''''''''''''''''''''''''r'o'o'd''''' 'y'm' 't'a' 'g'n'i'k'c'o'n'k' 'e'm'a'c' ''''''''''''''''''''''''''''''''W' '.'''''''s'i'h't' '''''''''''''''''''''''''''''s'i'That pa'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r''' 'd'e'z'i'l'a'r't'n'e'c'e''''''''''''''''''''''''''''''''''''''''':'A' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'v'i't'a'r'o'b'a''''''''''''''''''''''''''''''''''''''''s'T'D'R'C' 'f'o' 'p'o't' 'n'o' 't'i' 'o'd' 'o't'''''''''''''t' 'i't' 't'n'a'w' 'u'o'y' 'd'n'a' ','l'l'o'c' 'd'e's'a'b' 't'n'e'm'u'c'o'd'''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o't' '''''''''''n'o' 'g'n'i'k'r'o'w' ''''s'i'h't' ''''''' '''''''t' 's's'e's'u' 'e'H' '.'s'n'o'i't'a'c'i'l'p'p'a' 's'u'o'i'r'a'v' 'o't'n'i' 's'j'y' 'g'n'i''''e't'a'r'g'e't'n'i' 'p'l'e'h' 'r'o'f' 'e'g''''n'n'a''''''''' 'f'o' 's'''' 't'o'l' ''h'c'x'e' 'n'i' 'y'e'n'o'm' 's't'p'e'c'c'a' 's'e'm'i't'e'm'o's''''''''''''''''''''''''''t'r'o'p'p'u's'''''''''''''''''''''''g'n'i'''''''''''''''''''')'k'r'o'w''''''''''''''''''''''''''''''''''''''''''''' 'l'l'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'j'y' 'e'k'i'l' '''''''''''''''''','''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'u'o'Y''''''e's'e'h'T''''''''''''''''''''''''''''' '/' '''''''''f'o' 'e'l'p'u'o'c''''''''''''''g'n'i'd'a'e'l's'i'm' '/' ''d'r'i'e'w''''''''g'n'o'r'w' 'e'r'a' 's'k'r'a'm'h'c'n'e'b' 'r'u'o'Y' ':'B' 'g'n'i'd'n'e'p'p'A' '''''''''''''''''''''''''''''''''''''''''''''''' 'w'o'n'k' 'I' 's'a' 'r'a'''''''''''''''''''''''''''''''''''['''''''''https://github.com/sh''''''''''''' 's'i'h't' 'g'n'i'o'D''''I'are/sharedb''.''''''''''''''''' 'A'G'R' 'd'n'a' 'A'T'A'Y' 'r'o'f'''''''n'a'c' ''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'c'n'a'm'r'o'f'r'e'p' 'n'o'i't'a't'n'e'm'e'l'''''''''t'a' 'd'e'k'''''''''''''''''''''''''''''''''''''''I' 'e's'u'a'c'e'b' '''m'i'a'l'c' 's'i'h't' 'n'i' 't'n'e'd'i'f'n'o'c' 'l'e'e'f' ''''o'o'l''''n''p'm'i' 'r'u'o'y' 'r'o' ','n'o'i't'a't'n'''''''''''''''''''''''''''''''''' ')'h't'a'p'e'd'o'c' 'l'a'c'i't'n'e'd'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'''''o's'l'a' ''''.'''e'c'''i't'c'a'r'p'''''''a'r' 'n'i' 'e'r'a'r' 'y'l'e'm'e'r''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'o't' ','t'i' 'o'd' 'd'''u'o'y' 'w'o'h' 'w'o'n'k' 'I'g'n'i't'l'u's'e'r' '''''''''''''e'c'n'a'm'r'o'f'r''''f'e'p' 's'''s'j'y' 'g'n'i'g'n'a'h'c' 't'u'o'h't'i'w' ','t'x'e' 's't'a'h't' 't'u'b' '-' 's'e'c'a'r't' 'g'n'i't'i'd'e' 'y'v'a'e'h'-'t'c'i'l'f'n'o'c' 'h't'i'w' 's'e'c'n'e'r'e'f'f'i'd''''''g'n'a'h'c''''W''''.''' '''''e''''''''''''''''''a' 'e'h' 'c'''''''''''''''''o't'n'i' '''t'''''''''''''''''''''''''''''''''''''''''''''.'r'o'f' 's'k's'a' 'y'l'l'a'u't'c'a' 'y'd'o'b'''''''b'o'y'n'a' 'e'r'u't'a'e'f' 'a' 't'o'n' 's't'I' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'n'a' ','''''''''''''e'r'e'h't' ''nYes, I know and I agree''''''''''''''''''''''''''''''''''''''''''''''' 'y'r'o'm'e'm' 'd'n'a''''''''''''''''''''''''''''''''e''''''''''''''''''a''' ','y'l'b'a'u'g'r'a' 't'u'B' ''''''''g'a's'u' 'M'''''''''o'm' 'f'o' 'A'R' 'g'n'i't'l'u's'e'r' 'e'h't' 'd'n'a' ','''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'u'o'b'a's'''''''o' 't'o'l' 's'''e'r'e'''''''''''''''''''''''''''.'h'g'u'o'h't' 'n'u'f' 'y'l'l'a'e'r' 's'i''' 't'I'''''''''e'm'i't' 'h'c''''''''''''''r'o' 'k's'i'd' 'n'o''''c'u'u'm''n'n'''' '''' 'h'T' '.'e'c'a''The *act''''''''''''''''''''''''''''''''''''''''''''''''''''''''''')'w'o'l'e'b' 'e'r'o'm'(' '''''(' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'g'n'i'v'i'l' 'd'n'a' 'd'e''''''''''g'n'i't'i'd'e' 'y'l't'n'e'u'q'e'r'f'n'i' 's'i' 't'n'e'm'u'c'o'd' 'a' 'g'n'i'm'u's's'a'(' 't's'e'r' 't'a' 't'n'e'm''''''''''n'm'e'u'c'o'd' 'a' 'e't'a'd'p'u' 'o't' 'n'e'k'a't' 'e'm'i't' 'e'h'T'''''''''''''''' 'n'e'k'a't' 'e'm'i't' 'e'h'T''''T' '-'n'''ually important*''B'r't''*''''(' 'g'n'i't'i'*''d'n- How much time the document takes to save and load from disk''e' 'l'a'c'o'l' 'a'''' 'n'a' 'y''''c'a'l'p'e'r' 'o't' 'n'e'k'a'''''''a'o't' 'e'm'i't' 'e'h't' 's'''' 'e'r'u's'a'e'm' 'y'l'n'o' 't's'o'p' 's'i'h'T' '.'''d'n'a' '-' 'k'r'o'w' 'f'o' 't'o'l' 'a' 's'i' 'r'a'l'u'c'i't'r'a'p' 'n'i' 't'a'm'r'o'f' 'y'r'a'n'i'b' 'e'h't' 'g'n'i'g'n'a'h'C'''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e't'n'e'm'e'''''''''''''''''''''''''''''''''''''''''''''' ''''y'm' '''''''''''''''''''''''''''''''''' did''''I'd'''''''''''''d'l'u'o'w'''''''''''''''''''''o's' ''.'S'''''''''t'''''''''''''' 'g'n'i't'l'u's'e'r' 'e''''''''''''''''''''''''n'-'-'-'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'l'o'h'w'''''''''''''''''''''''''''''''''''''''''''''''y'l'e'm'e'r'''''''''''''''''s'' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'r'o'p''''''''''''''t'u'b' ','g'n'i't'i'd'e' 'p'u's' 'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'T'''''''''''''.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'e't''''''''''''''''''''''''''''''''''''''''''''''''''''''''c' 't'p'i'r'c's'a'v'a'j' 's''''''''''''''''''''''''!''''''''''''''''''''y'l'l'a'e'r''''e' '''''''''''''''''''''''''''''''''''''''''''''''''n':'e'd'o'c' 's'i'h't' 't'a' 'k'o'o'L' '.'t's'a'f' 'e'b' 'o't' 'g'n'i'y'r't' 'n'e'v'e' 't'o'n''''''''''''t's'u'j' 'y'l'l'a'e'r' 's't'''''''''' 'd'y'I'''''''''''''''' 't'a' 'k'''''''''' 'k'o'o'o'l' 'a' 'e'k'a'T' '!'!'w'o'n'k' 'I'n''''w'o'l's' 'y'l'l'a'e'r' 's'i' 'e'g'r'e'm'o't'u'a' ','w'o'c' 'y'l'o'H' ':'C' 'x''''g'i'd'n'e'p'p'A' '#'#'#'n's'i'l' 'e'v'''I' 's'e'h'c'a'o'r'p'p'a' 'e'h't' 'f'o' 'y'n'a' 'h't'i'w' 'k'r'o'w' 'd'l'u'o'h's' 's'g'n'i'h't''''a''B'''''''''e'r'a''')''''''''''''''''''''''''e'v'o'b'a' 'g'n'i'o'd' 'm'''I' 't'a'h'w' 'o't' ''r'e't't'a'm'i't'n'A' 'r'o' ',''''''''''''' 'r'o' 'm'h't'i'r'o'g'l'a' 'C'G' 's'''s'j'Y' 'g'e'(' ''''''''''''''''''s'e'x'i'f' 'e's'e'h't''''' 's't'i' ''''''''''''''''''''''''''''''''.''''''''''o' 'o't' 'l'a'n'o'g'o'h't'r'o' 's'i' 's'i'h't' 'g'n'i'x'i'f' 't'u'b' ','d'e'x'i'f' 'e'b' 'n'a'c' 's'i'h'T''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a' 't'u'B' '.'e'm'i't' 'o't' 'e'm'i't' 'm'o'r'f' 'e'z'i's' 't'n'e'm'u'c'o'd' 'e'h't' 'n'w'o'd' 'g'n'i'm'm'i'r't' 'd'n'a' ','''' 's'i'h't' 'g'n'i'x'i'f' 'r'o''''r'f' 's'm'h't'i'r'o'g'l'a' 'e'm'o's' 'e'r'a' 'e'r'e'h'T''''''''''' 't'''n'o'd' 'u'o'Y'''''''''''''''''''''''d'e'e'n' 'y'l'l'a'u't'c'a' 't'''n'o'd' 'e'W''''T'''''''''''''''''e'c'i't'c'a'r'p' 'n'i' ''''''''''''''''''''''''''''''''''''''''o't' 'h'g'u'o'r'h't' 's'l'l'a'c' 'M'S'A'W''''''' 's'l'l'a'c' ''''''''''''''''''''''''''''i' '''''''''''''''''''''https://github.com/automerge/''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!''''''''''''n'u'R' '.'o'o't' 'w'o'n'k' 'o't' 'e'v'o'l' 'd'''I''''''' 'e'b'y'a'm'''''''o'l' 'd'''I' '-' 'n'o'i't's'e'u'q'''''''e'u' 'd'o'o'G' '?'e'r'a'p'm'o'c' 's'r'-'e'g'r'e'm'o't'u'a' 's'e'o'd'''''''''''u'a' 's'i' 't's'a'f' 'w'o'H' '!'s'i'h't' 'g'n'i'd'a'e'r' 'e'r'''u'o'y' 'e'm'i't' 'e'h't' 'y'b' 'automerge-r'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e'd'n'a'l' 's't'i' 'e'b'y'a'M' '.'s'h't'n'o'm' 'r'o'f' '''w'o'n' 'n'o''''n'o's' 'l'a'e'r''' 'n'e'e'b' 's't'I'''''''''''''''''''''k'e'e'w' 's'i'h't' 'e'b'y'a'M'(' '.'s'd'n'a'l' 'y'l'l'a'n'i'f' 't'a'h't' 'r'e'v'e'n'e'''''''''''''r'e'v'''''''e'n'e'h'w' ',')'s'(']'s'r'-'e'g'r'e'm'o't'u'a'[' 'y'b' 'd'e'c'a'l'p'e'r' 'e'b' ''''''''''''''''e'r' 'e'b'o't' 'g'n'i'o'g' 'l'l'a' 's'i' 'e'd'o'c' 's'i'h't' 't'u'B''''T'n'''''''''''''''' 'e'm'o's' 'e'r'a' 'e'r'e'h'''T'''''''i' 's'i'h'T' '.')'s'm'e't'i' 'd'e't'e'l'e'd' 'l'l'a' 'm'o'r'f' 's'e'n'o't's'b''''s'm'o't' 'p'e'e'k' 'e'w' 'e'c'n'i's'(' 'e'm'i't' 'r'e'v'o''u' 'w'o'r'g' 's'i'h't' 'e'k'i'l' 's'T'D'R'C' '.'g'n'i'n'u'r'p' 'o't'n'i' 'g'n'i'k'o'o'l' 't'o'n' 'o's'l'a' ''-'-'-'n'n'''I'm''''' 'm'''I'n'n'.'t'n'e'm'o'm' 'e'h't' 't'a' 'm'e'l'b'o'r'p' 's'i'h't' 't'u'o'b'a' 'g'n'i'k'n'i'h't' 's'i' 'y'd'o'b'o'n' ','w'o'n'k' 'I' 's'a' 'r'a'f' 's'A'n'n''''t'''''''''''t'n'e'r'r'u'c'n'o'c' 't'n'a'w' 't'h'g'i'm' ''''''''''''''''''''''''''''''''''''.'s'r'o't''''o'''''''i't'i'd'e' 't'x'e't' 'e'v'i't'a'r'o'b'a'l'l'o'c' 't'''n'e'r'a' 'h'c'i'h'w' 'e'r'e'h't' 't'u'o''''a' 's'n'o'i't'a'c'i'l'p'p'a' 'f'o' '%'9'9' 'e'h't''''''''' 'e'h't' 'l'l'a'l'l'''i'w'''''''''''''''''''''''''''w' 'f'i' 'y'l'l'a'i'c'e'p's'E' '.'''''''''''e'p's'E' '.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a'''''''''''''''''a'h't' 's'n'i'o't'a'c'i'l'p'p'a' 'e'r'o'm' 'o't' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'd'd'a' 'e'w' 'g'n'i'p'o'h' 'e'r''''''''''''''u'o'y' ')'e'm' 'e'k'i'l'(''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'g'n'i't'i'd'e' 't'x'e't' 'f'o' 't'x'e't'n'o'c' 'e'h't' 'e'd'i's't'u'o' 'l'u'f'e's'u'''''''o'm''''u''''u'''''''''g'n'i'h't'y'n'a' 'e'b' 'o't' 's'T'D'R'C' 't'n'a'w' 'e'w' 'f'i' ''''''''''''''''''''''''' 'e'w' 'f'i' '''''''(' 's'n'o'i't'a'c''''i'l'p'p'a' 'l'l'a'e'r' ''''''' 'e'm'o's' 'r'o'f' 's'''' 'r'e't't'a'm' 't'i' 'd'n'a''''n' ','t'x'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'n'e'i'c'i'f'f'e'n'i' 'y'l'l'a'e'r' 'y'l'l'a'u't'c'a' 's'i' 's'i'h'T'''''''''''''''' 'r'o'f' 's'i'h't' 'o'd' 'e'W'''''s'i'h'T'n'n'n'i'a'g'a' 'k's'i'd' 'o't' 'k'c'a'b' 't'n'e'm'u'c'o'd' 'e'l'o'h'w' '''3. Save the''''''''''''' ''''''' 'w'e'h't' 'e'v'a'S' '.'3'n'e'g'n'a'h'c' 'r'u'o'y' 'e'k'a'M' '.'2'n'M'A'R' 'o't'n'i' 't'n'e'm''''''''''n'm'e'u'c'o'd' 'e'h't' 'd'a'o'L' '.'1'n'n':'o't' 't'''''''t' '''''''t' 'n'a'w' 'u'o'y' 'g'n'i'm'u's's'a'''' 'o't' 'n'e't't'i'r'w' 'e'r'a''''''''''''''''''''''i'r' 'e'h't' 'e'm'u's's'a' 'o't' 'm'e'e's' 'e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'y''''a' ','y'l't'n'e'u'q'e'r'f'n'i' 'o't' 'n'e't't'i'''''''r'w'''''''''''''''''''''''r'w' 'y'l't'n'e'u'q'e'r'f'n'i' 'y'r'e'v' 's't'i' 'd'n'a' ','s'e'r'g't's'o'p''''P' 'n'i' 'd'e'r'o't's''i'l'''''' 'T'D'R'C' 'a' 'e'v'a'h' 'I' 'f'I' '.'t's'e'r' 't'a' 't'n'e'm'u'c'o'd' 'a' 'g'n'i't'''''''''''''g't'n'i'a'd'p'u' 's'i' 't'u'o'b'a' 'g'n'i'k'n'i'h't' 'e'b' 'o't' 's'm'e'e's' 'y't'i'n'u'm'm'o'c' 'e'h't' 'n'i' 'y'd'o'b'o'n' 'n'o'i't's'e'u'q' 'e'h'T'n''n'''''''''''''''''''s'n'o'i'''''''''''''''''''')''''''''''''''''''''''''' 'g'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h'T'n'n''''''(' ''.'d'e't'e'l'e'd' 'n'e'e'b' 's'a'h' 'm'e't'i' 'e'h't' '*'f'i'*''''i' 't's'u'j' 't'o'N' '.'d'e'n'e'p'p'a'h' 'e't'e'l'e'd' 'h'c'a'e' '*'n'e'h'w'*' 'e'r'o't's' 'o't' 'd'e'e'n' 'u'o'y' 'e'g'r'e'm'o't'u'a' 'r'o'f' 'e's'u'a'c'e'b' ','''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'e't'e'l'e'd''''''''.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''I' ''''''''''''r'e'v'e't'a'h'w' 't'u'b' ','n'o'i't'a't'n'e'm'e'l'p'm'i' 'f'o'''''''''' 'f'p' 's'm'r'e't' 'n'i' 's'n'o'i't'a'c'i'l'p'm'i'''''''''''' 'd'l'r'o'w'-'l'a'e'r' 'e'm'o's' 's'a'h' 'y'l'b'a'b'o'r'p' 's'i'h'T' '''''''''''''''''''''''')'g'o'l' 'n'o'i't'a'r'e'p'o' 'e'h't' 'o't'n'i' 't'a'h't' 's'''''''a' 't'u'p' 'e'g'r'e'm'o't'u'A' '.''''''' '.'e'r'u't'c'u'r't's' 'n'o'i's'r'e'v' 'e'h't' 'o't'n'i' 'n'o'i't'a'm'r'o'f'n'i' 't'a'h't' 's''''a'k'c'a'p' 'd'n'a' 'm'e'h't' 's'e'd'o'c'n'e'-'h't'g'n'e'l'''''''l'e'-'n'u'r''''''''''''''''e'-'E'L'R''''''s'k'c'a'p' 's'j'''''''s'h''''s'Y'(' '''' '.'y'''''''.'t'l't'n'e'r'e'f'f'i'd' 'y'l't'h'g'i'l's''''l' 's'm'e't'i' 'd'e't'e'l'e'd' 't'u'o'b'a' 'n'o'i't'a'm'r'o'f'n'i'''''''''''''''b'a' 'n'i'o't'a'm'r'o'f'n'i'''''e'l'e'd' 't'a'e'r't' 'e'g'r'e'm'o't'u'a' 'd'n'a'''''''''''''''''''''''''''''''''''''''''s't'n'e'm'e'l'e'''''''''' 's't'n'm'e'e'l'e' 'd'e't'e'l'e'd' 't'u'o'b'a' 'n'o'i't'a'm'r'o'f'n'i'''''''h't' 's''''a'k'c'a'p' '''''''''''''''''''''''''''''''''''''''''''''''''' 'e'h't' 'f'o' 'g'n'i'd'o'c'n'e' 'h't'g'n'e'l'-'n'u'r' 's'e'o'd' 't'a'm'r'o'f' 'y'r'a'n'i'b' 's'''s'j'y' '-' 'r'e't't'a'm' 't'h'g'i'm' 'h'c'i'h'w' 'e'c'n'e'r'e'f'f'i'd' 'e'n'o' 's'i' ''e'h't' 'o't' 'r'a'l'i'm'i's' 'y't't'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'e'c'n'e'r'e'f'f'i'd' 'l'l'a'm's' 'w'e'f' 'a' 's'''e'r'e'h'T''''''' 'I'n'n'.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'r'e'd'r'o' 'n'i' 'd'e'r'o't's' 'y''''''''''t's' 'd'a'e'r'l'a' 's'i' 't'n'e'm'u'c'o'd' 'e'h't' 't'a'm'r'o'f' 's'i'h't' 'n'i''''' 'e'h't'''''''''''''''''''''o'r'p' 'o't' 'e'v'a'h' 'y'l'n'o' 'u'o'y' 'e's'u'a'c'e'b''''e' 'r'e't's'a'f' 't'i'b' 'a' 'y'l'b'a'b'o'r'P' ''''''''''b'a'b'o'r'P' 'r'p' '''i'v'a's' 'd'n'a' 'g'n'i'd'a'o'l' 'r'o'f''m'i'a'l'c'(' 't'c'e'p's'u's' ''t'a't'n'e'm'e'l'p'm'i' 'e's'e'h't' 'f'o' 'l'l'a' 'n'e'e'w't'e'b' ''h't''c'e'p'x'e' 'I' '''''e'r'''y'e'h't' 'e's'u'a'c'e'b' '' 't'i'''e'''''d'o'c' 't'a'h't' 'e't'o'r'w' '''''''''''''''''''' 'y'l'b'a'b'o'r'p''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''k'n'i'h't' 'I' 'd'n'A' '.'l'a'c'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'o'f'e'b' 'g'n'o'r'w' 'n'e'e'b' 'e'v'''I' 't'u'B' '''n'n'''.'s'e'c'a'r't' 'g'n'i't'i'd'e'''''''''''''''''''''''''''' '-' 'e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't' 's's'e'c'o'r'p' 'o't' 'n'e'k'a't' 'e'm'i't' 'e'h't' 'o't''''w' 'l'a'n'o'i't'r'o'p'o'r'p'''' 'n'i''t'n'e'd'i' 'e'b' 'd'l'u'o'w' 'e'z'i's' 'o's' '-' ''''''''''''''''''')'t'c'a'p'm'o'c' 'y'l'e'm'e'r't'x'e' 'e'r'''y'e'h't'(' 's't'a'm'r'o'f' 'y'r'a'n'i'b' 's'''e'g'r'e'm'o't'u'a' '&' 's'j'y' 'y'p'o'c' 'd'''I' ',''''n'd'i'd' 'I' 'f'I''''''''''''''''''''''''' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h't''''''''''''''''''''' 'y'l'h'g'u'o'r' 'e'b' 'd'l'u'o'w' 't'i' 'k'n'i'h't' 'I' ''n'.'e'd'o'c' ''n'o'i't'a't'n'e'm'e'l'p'm'i''''''''t's'u'r' 'r'o' 's't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'y'm' 'n'i' 't'a'm'r'o'f' 'l'p'm'i' 't'''n'e'v'a'h''''''''''''''''''''''''y'r'a'n'i'b' 'a' 'e'v'a'h' 't'''n'o'd' 'I' '''''''''''''''''''''' 't'''n'o'd' 'I''''''''''''''''e'r' 'y'M' '-'n'''''''''y''' 'e'h'T''''''''''''''''''''' 'h't'o'b'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'o'i't'a't'n'e'm'e'l'p'm'''''''m'n'i' 'y'n'a' 'o't' 's't'a'm'r'o'f' 'g'n'i'k'c'a'p' 'y'r'a'n'i'b' 'e's'o'h't' 't'r'o'p' 'd'l'u'o'c' 'u'o'y' 'k'n'i'h't' 'I' '-' '''''''h' 'e'm' 'r'o'f' 'h'g'u'o'n'e' 's'i' 'f'o'o'r'p' 'e'c'n'e't's'i'x'e' 'n'A'''h'T' '.'''''''''''s'n'o'i't'a't'n'e's'e'r'p'e'r' 'y'r'a'n'i'b' 't'c'a'p'm'o'c'''''t's'a'f' 'y'r'e'v' 't'n'e'm'e'l'p'm'i' 's'e'i'r'a'r'b'i'l''''''''''''''''''''''''''''n't'm'e'e'l'p'm'i' 'h't'o'b' 'e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'Y' '-'n'n':''''''''''''''''''''''''s't'd'r'c'-'e'c'n'e'r'e'f'e'r' 'y'm' 'e's'u'a'c'e'b'''''''''''''' 'h't'o'b' 'e'u's'a'c'e'b' 'y'a'w' 's'i'h't' 't'i' 'd'i'd' 'I'n'n''''''' 'f'o' 't'o'l' 'a' 's't'I' '''''''''' '''''''''''''' 'f'o' 't'r'o's' 'I' ''r'o'p'p'u's' 'A'G'R'n'a'm'r'o'f'r'e'p' 'e'm'o's' 'e'b' 't'h'g'i'm' 'e'r'e'h'T' '-'t's'o'm'l'a' ''''''''''i' 'n'a' 'd'n'a'(''e'm'e'l'p'''m'i' 'r'u'o'y' 'g'n'i''''e'g'n'a'h'c' 't'u'o'h't'i'w' ''''T'D'R'C' 'n'e'e'w't'e'b' ''''''' 'b'd'e''''''d'r'a'h's')'/'(']' '''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'r'o'p'p'u's' 'P'2'P' 't'n'a'w' 'u'o'y' 'f'I'n'n''''''''''''''''''''''P'2'P''''''''''''''''' 'd'n'a' 'g'n'i't'i'd'e' 'p'2'p' 's't'r'o'p'p'u's'''''' 's'e's'u'''''''''''''''''''''''''''''''.'t'r'o'p'p'u's' 'T'D'R'C' 'l'l'u'f' 'd'e'n'n'a'l'p' 's'a'h''''''''l'p'm'i' 's'i'''''''''' 's'e's'i'm'o'r'p' 'h'c'i'h'w' '-' ''''''''''''''''''''''' ','d'r'a'w'r'o''['f' 'g'''https://github.com/redwood/redwoo')'d'(']''n'i'k'o'o'L' ''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''.'d''''r'o'o'w'd'e'R' 'r'o'f' 'd'e't'i'c'x'e' 'm'''I''''''''''''''''''''''''''''''''' '.')'n'e'h't' 'e'c'n'i's' 's'r'o't'u'b'i'r't'n'o'c' 'f''''''' 'c'o' 'y'm'r'a' 'n'a' 'y'b' 'd'e'v'o'r'p'm'i' 'y'l'l'a'u'n'i't'n'o'c' 'n'e'e'b' 's'a'h' 'd'n'a' ','o'g'a' 's'r'a'''''''r's'e'y' 'e't'o'r'w' 'I' 'h'c'i'h'w'(' 'y'm''''''''B'D''''d'e'r'a'h'S' 'e's'u' 'n'a'c' 'u'o'Y' '.'t'e'y' 's'T'D'R'C' 'f'o' 'p'o't' 'n'o'f' 's'a'''''''''''''''''''''''''''''''.'t'e'y' 'l'l'e'w' 's'i'h't' 'e'n'o'd''''m' 's'a'h' 'y'd'o'b'o'n''''''''n'a'c'''''''a'n' 'u'o'y' ','g'n'i't'i'd'e' 'e'm'i't'l'a'e'r' 'r'o'f' 's'c'i't'n'a'm'e's' 'e'k'i'l' 'e's'a'b'a't'a'd' 't'n'a'w' 'u'o'y' 'f'I'n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''I' 'd'n'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'l'a'c'o'l''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'l'l'a'u't'c'a' ''''''' 'e'r'o'm''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'a' 'e'v'a's' '''''''''''''''''''''''''''''''''''''''''''''''''' 'd'n'e's' 'r'o'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'c'n'a''''''''''' 'e'k'a'm' 's'r''.'e's'u''m'r'o'f'r'e'p''''''''''''''''''''''''''''''''''''''''''.'e'r'e'h' 'n'e'p'p'a'h' 's't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'n'e'h'w' '''''''''''''''''''''''''s'w'o'd'a'h's' 'e'h't' 'n'i' 'g'n'i'k'r'u'l' 's'e's'a'c' 'l'a'c'i'g'o'l'o'h't'a'p' 'e'b' 'd'l'u'o'c''''''' 't'h'g'i'm' 'e'r'e'h'T' '.'''''''''' '-' 's't'i'd'e' 'g'n'i'k'a'm' 'r'e's'u' 'e'l'g'n'i's' 'a' 's'a'h' 'y'l'n'o' 'o's'l'a' 'e'r'e'h' 'g'n'i's'u' 'm'''I' 'e'c'a'r't' 'g'n'i't'i'd'e' 'e'h'T'''''''''''''' 'e's'e'h't' 'f'o' 'l'l'A'''''''''' 'o's'l'a' 'm'''I'''''''e'W'n'n' 'e'r'o't's'''''' 'd'n'e's'''''''n'e' 'o't'''''''''''''''''k'r'o'w't'e'n'''''e'r'i''''o'w' 'e'h't' 'r'e'v'o' 's'e'k'a't' 't'n'e'm'u'c'o'd' 'a' 's'e't'y'b' 'y'n'a'm'''''''''''''''''''''''''''''''''''''''''''''''''''''t'n'e'm'u'c'o'd' 'e'h't' 'e'v'i'e'c''''v'e'r' 'd'n'a' 'd'n'e's' 'o't' 's'e'k'a't' 't'i'''''''o'd' 'e'h't' 'e'c''''e'a'p's' 'h'c'u'm' ''''m'w'o'H' '''''''''''''''''''-''' '-'n'k's'i'd' 'm'o'r'f' 'd'a'o'l' 'o't' 's'e'k'a't' 't'n'e'm'u'c'o'd' 'e'h't' 'g'n'o'l' 'w'o'H' '-'n'n''''''''''':'e'r'a' 's'c'i'r't'e'm' 't'n'a't'r'o'p'm'i' 'e'h'T'n'n'.'r''''.'e't't'a'm' 't'''n's'e'o'd' 'y'l'b'a'b'o'r'p' 'r'e't's'a'f' 'g'n'i'o'g' ','s'm'1' 'r'e'd'n'u''''''''''''' 'n'i' 't'i'd'e' 'r'e's'u' 'y'n'a' 'e'l'd'n'a'h' 'n'a'c'''''' 's't'e'g' 'T'D'R'C'''''''R'c' 'a' 'e'c'n'o' 'o's' '-' 't's'a'f' 'y'r'e'v' 'e'p'y't' 't'''n'o'd' 'y'l'p'm'i's' 's'r'e'g'n'i'F' '.'*'''''' 'h'g'u'o'n'e' 't's'a'f' 'n'e'p'p'a'h' 'o't' 's'd'e'e'n' 'y'l'n'o' ''''o'r'e's'u' 'e'h't' 'm'o'r'f' 's'e'g'n'a'h'c' 'g'n'i'm'o'c'n'i' 'g'n'i't'p'e'c'c'A'' 'w'o'n'k' '''''''''''The''''' 'e'h'T'n'n'.'e'e'r'g'a' 'I' ','s'e'Y'n'n'e'c'n'a'm'r'o'f'r'e'p' 'f'o' 'e'r'u's'a'e'm''''''''''k'r'a'm'h'c'n'e'b' 'g'n'o'r'w' 'e'h't' 's'i' 's'i'h'T' ''''''''.'n'o' 'o's' 'd'n'a' ')'s'n'o'i't'i's'o'p' 'r'o's'''''''s'o'r'u'c'(' 'e'c'n'e's'e'r'p' ','s'e'r'u't'c'u'r't's' 't's'i'l'-'n'o'n' 'r'o'f' 't'r'o'p'p'u's' ','s'l'o'c'o't'o'r'p' 'k'r'o'w't'e'n' ','''''''''' 'd'n'a' 'g'n'i'd'o'c'n'e' 'y'r'a'n'i'b' 'g'n'i'd'u'l'c'n'i' ','''''''''''''''' '.'l'l'e'w' 'o'd' 'o't' 's'd'e'e'n' 't'i'''''''''''''###'' '' 't'i' ' 's'g'n'i'h't' 'r'e'h't'o' '0'0'1' 'e'r'a' 'e'r'e'h't' 'y't'i'l'a'n'o'i't'c'n'u'f' 'n'o''''''''''' 'e'r'a' 'e'r'e'h't' 's'j'y' 'h't'i'w' 'e't'e'p'm'o'c' 'o't' 'e'l'b'a'''''''''''' 'e'l'b'i't'a'p'm'o'c' 'e'b' 'o'T''''''''''''''''''''''''''''''''' 't'a'h't' 's'g'n'i'h't' 'r'e'h't'o' '0'0'1' 's'''e'r'e'h'T''''''''''''''''''''e'v'a'h' 't'''n'o'd' 'y'l'p'm'i's' 'I' '.'y'r'a'r'b'i'l' 'T'D'R'C' 'e's'o'p'r'u'p' 'l'a'r'e'n'e'g''''r' 'l'u'f'e's'u'''''''''e'l'b'a'i'l'e'r' 'a' 'o't'n'i' 'n'r'u't' 'r'e'v'e'n' 'w'''''''''y'l'b'a'b'o'r'p''''m' 't'i' 't'u'b' ','t's'a'f' 'y'l'l'a'e'r' 's'i' 'e'd'o'c' 't's'u'r' 'y'M'n'n'''p' 't'n'e'c'a'j'd'a' 'd'n'a'(' ''k'r'o'w' 'd'n'u'f' 'o't'''''''''''''''''''''''''''''''''.'e'm'i't' 'l'''' 'l'u'f' 's'j'y' 'n'o' 'k'r'o'w' 'n'a'c' 'e'h'''''''e'k' 'o's''''''''''''''''''''''' 'r'o'f' 'e'g'n'a'h'c'x'e' 'n'i' 'k'r'o'w' 'd'i'a'p' 'e'm'o's' 's't'p'e'c'c'a' ''''s'j'y''''''''''''''''''''''''''''''''s'n'h'a'J' 'n'i'v'e'K' 'h't'i'w' 't'c'a''''e't'n'o'c' 'n'i' 't'e'g' 'o'c''''''''''''''''''''' 'o't' 'e'l'b'a' 'e'b' 't'h'g'i'm'a' '''''''''''''''''''''''''''''''''''u''' 'd'l'u'o'h's' 'u'o'y' 'y'a'd'o't''''''''''''''''''''''d'n'a' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'n'i'v'e'K' ','n'o'i't'a'c'i'l'p'p'a' 'r'u'o'y' 'n'i' 's'j'y' 'g'n'i't'n'e'm'e'l'p'''''''''''''m'l'p'e'm'i' 'p'l'e'h' 't'n'a'w'''''''''''y'e'n'o'm' 'e'v'a'h' 'u'o'y' 'f'I''''''''''''' 'u'o'Y''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''l'l'i'w' ')'e'm'i't' 's'a'h' 'n'i'v'e'K' 'f'i'(''''g' 'h'c'i'h'w' '-' 't'n'a'w' 'u'o'y' 'f'i''''''t' 's'j'y' 'f'o' 'r'o's'n'o'p's' 'a' 'e'm'o'c'e'b''''''t'e'g' 'o's'''''''''''''''t'i' 'd'e'e'n' 'u'o'y' 'f'i'l'a' 'n'a'c' 'u'o'Y''''''' 'n'i'v'e'K' '.''''''''''''''''''''''''''''''''''''''''d'e'e'n' 'u'o'y''''''''t'n'a'w' 'u'o' 'f'i' 't'r'o'p'p'u's' 'd'i'a'p' '+'(' 't'r'o'p'p'u's' 't'a'e'r'g' ','e'g'a's'u' 'y'r'o'm'e'm' 'w'o'l' ','' 'n'o'i't'a'c'i'l'p'p'a' 'n'a' 'g'n'i'd'l'i'u'b' 'e'r'''u'o'y' 'f'I'''''''''''''''''''''''''''''''''''''''e'c'n'a'm'r'o'f'r'e'p' 't'n'e'l'l'e'c'x'e' 's'a'h' 's'j'Y' '.'s'j'y' 'e's'U'n'n'?'o'd' 'I' 'd'l'u'o'h's' 't'a'h'W' '.'n'o'i't'a'c'i'l'p'p'a' 'y'm' 'r'o'f' 'T'D'R'C' 'a' 'e's'u' 'o't' 't'n'a'w' 'I' '?'w'o'n' 't'a'h'W''''''''''o'o'c' 's't'a'h'T''''''''''''''''''''''e's'u' 'o't' 't'n'a'w' 'I' 'f'i' 't'a'h'W' '#'''#''''''''''''''''''''''y'm' 'n'o' 'n'o'i't'a'm'r'o'f'n'i' 'e'r'o'M''''Appending A: ''''''''''''h'W' '#'n'n'x'''''''g'n'i'd'n'e'p'p'A' '#'n''n'''''''''''''''''''''''''''''''''''''''''''''''''''a' 'e'r'a' 'e'r'e'h''''''''''''''''''''''''''''''''''' 'o't' 'p'''''''''''''''''''''''''''e's'e'h't' 'e'r'a''''A' '-' 'n'o' 'g'n'a'H'''''''''''''''''''''''''''''''''''?'''e'''''m'a's' 'e'h't' 'y'l'l'a'''''''l'l'u't'c'a' 's'T'D'R'C' 'e's'e'h't' 'e'r'A''''''''='='=' 's'j'Y' '#'#'#''n'n''''''''''''''''''''''' 't's'o'p' ''''n'n'.'''s'''i'h't' 'h'g'u'o'r'h'T'''''''''''''''''''''''''''''''''''''e'm'a's' 'e'h't' 'y'l'l'a'c'i'''''''i'''''''i'a'c's'a'b' ''''''''''''''''''''''''''''''''''''''''''''''f'o'''''''m'''''''''''''''''''''''''' 'k'n'i''''''''''''''''''''''''n'n'''.'''e'r'o'f'''e''''''''''y't'r'e'p'o'r'p' '''''''''''''''''''r'e'p'o'r'p'''b' 'd'e'r'e'v'o'c's'i'd' 's'a'h''h't' 'I'''''''' 'y'd'o'b'o'n' 't'a'h't' 'a''''''''r'e'h't'i'e' 'e'd''s''''i' 'l'e'v'o'n''''''''''''''''''''''''' 'I' 'k'n'i'h't' 'I' 't'a'h't''''''''''''''' 'I' 'k'n'i'h't' 'I' 'd'n'a' '''''''''''''''''a''''-'C''''n'Y''''n':''h't' 'a'e'd'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''S' '-'n'''s't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'r'o'f'''''S' '-'''n''' 'c'i'g'o'l' 't'n''''''''''''''''''''''''e't'''''C''' ''''''''''' 's'''s'j'y'-'n'''a''n'n''''''''''a'o'd' 'o't' 'p'u' 't'i' 'p'e'e'k' 'd'n'a' ',''e'r'e'f'f'''''''''''''''''''''''''''''''''''''''y''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''###''''' '#'#'#'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'c'i't'n'a'm'e's' 'e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'y' 'n'e'e'w't'e'b' 's'e'h'c't'i'w's' 'h'c'i'h'w' 'r'e't'e'm'a'r'a'p' 'e'p'y't' 'a' 't'p''''e''''''''''''''''a' 't'p'c'e'c'c'a'''''''a'h' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'T'D'R'C' 'y'm' 'e'k'a'm''''''' 'a' 'd'd'a' 't'n'i'o'p' 'e'm'o's' 't'a' 'l'l'i'w' 'y'l'b'a'b'o'r'p' 'I' ','e'd'o'c' 't's'u'r' 'y'm' 'r'o'F'n'n''r'a'r'b'i'l' 's'i'h' 'o't'n'i' 'e'g'n'i'h' 's'i'h't' 'g'n'i'd'd'a' 'n'i' '''' 'i'd' 'y'l't'h'g'i'l's' 'd'e's'u' 'h'c'i'h'w' ')'''''''''''''''o't'u'a'''t'a' 'h't'i'w' 'e'v'i't'a'n'r'e't'l'a' 'n'a' 'e'k'a'm' 'r'o'(' '' 'w'e'n' 'a''''''i' 's'''''''''''''''''!'''''',''d'l'o'b' 'g'i'b' ''''''''''e''''''''''''''''''''''e'h't''''a''''''''''' 'e'h't''''''''''''''''''e'''''''''''''t'a'h't' ''''''''''''''''t'h'a' 't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''')'s'e'c'a'r't' 'g'n'''''''l'e'v''.''''''''''''n'e'v''''''''''''''''''e'u'r't' 's'i' 's'i'h't' 't'a'h't' ''o'n' '''''''''''''n'i'k' 'i't'i'd'e' 'r'e's'u'''''''''''''''''''''''''''''''''''''''''''''''''''r'o' 'g'n'''''''''''s''''''''''''''''''''y' 't'n'e'd'i'f'n'o'c' 'm'''''''''''''''y''' 'k'n'i'h't' 'I' 'd'n'A'c'i't'n'a'm'e's''''a' 'i's'u' 'n'e'h'w''''''''''''''''''''''e'g'r'e'm'o't'u'a' 'd'n'a' 's'j'y' 'r'o'f' 'e'c'n'a'm'r'o'f'r'e'p' 'l'a'c'i't'n'e'd'i' 's'a'h' 'h'c'i'h'w' ','' 'e'l'g'n'i's' 'r'o'f' 't's'a'e'l' 't'a'(' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'h'c'i'h'w' '-' '''m'i'a'l'c''''l' 'd'l'o'b' 'a' 'y'l'l'a'u't'c'a' 's'i' 's'i'h'T''''''''''''''''''''Y''''''''''''''''d'e'c'n'i'v'n'o'c' 'm''''''''''''''''''''''''''''''''''''''''''''''''''o't' ''.'Y''''''d'''e't'n'a'w' 'u'o'y' 'f'i' '''''''''''''''''''''''''''''''''''''''''''''''''''''h'c'a'e''','' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t''''''''''''''''''''''''''''''''''''''''''''''' ','l'o'o'c' 'e'''' 'y'n'a''''' 'e'h'''''''''''''''''''''''''''e'l'b'i't'a'p'm'o'c' 's'j'y' 'g'n'i'k'a'm''''''n'i'd'd'a'''''''g'n'i'k'a'm' 'f'o' ''t''l'i'h'w''''''''''''' 'n'i' ' ','''''''''''''''''''''''''''''.'t'n'i'o'p' 'y'n'a''''t' 'e'e's' 't'''n's'e'o'd' 'e'h' 'd'n'a' 's'i'h't' 't'u'o'b'a' 'n'i'v'e'K' 'o't' 'd'e'k'l'a't' 'I'a'm'r'o'f' 'g'n'i'd'o'c'n'e' 'y'r'a'n'i'b' 'e'h't' 'e'g'n'a'h'c''''h' 'd'n'a' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e't'a'd'p'''''''''''''''''''''e'h'T'''''' 's'i'h'T' '.'t'n'e'm'u'c'o'd' 'e'h't' 'n'i' ''u' 'd'n'a' ''''''''''*'q'e'S'x'a'm'*' 'e'r'o't's' 'd'n'a' '*'m'e't'I'*' 'n'i' '*'t'h'g'i'R'n'i'g'i'r'o'*' 'f'o' 'd'a'e't's'n'i'''''''''''f'o' 'd'a'e't'n's'i' '*'q'''''''e's'''''''a'm'*' 'e'r'o't's' 'd'n'a' ','d'o'h't'e'm' '*'e't'a'r'g'e't'n'i'*' 's'''s'j'y' '''''''''''''''''''''''''''''''''''e'g'n'a'h'c' 'o't' 'e'v'a'h' 't's'u'j' 'd'''u'o'y' '-' 's'c'i't'n'a'm'e's' 'A'G'R' 't'n'e'm'e'l'p'm'i'''''''''t'n'e'm'e'p'm'i' 'o't' 's'j'y' 'y'f'i'd'o'm' 'o't' 'h'c'a'o'r'p'p'a' 'e'm'a's' 'e'h't' 'e's'u' 'd'l'u'o'c' 'u'o'y' 'e'v'e'i'l'e'b' 'I''''' 'u'o'Y''''' 'd'n'A' '.''''''''''''''''''' 'y't'r'e'p'o'r'p''''''''''''''''''''''''' 'y'm' 'n'i' 'y't'i'l'i'b'a'g'n'a'h'c'r'e't'n'i' 's'i'h't' 'd'e't'a'r't's'n'o'm'e'd' 'e'v'''I''.'e'g'n'a'h'c' 't'''n'o'w' 'e'c'n'a'm'r''''''''''a'r'm'o'f'r'e'p' 'e'h't' ','s'c'i't'n'a'm'e's' 'p'a'w's' 'u'o'y' 'f'i''''''''''''''''e'c'n'a'm'r'o'f'r'e'p' 'e'h't' 'd'n'a' ','''''e'l'b'a'g'n'a'h'c'r'e't'n'i' 'e'r'a' ''''''''''''''' 's'c'i't'n'a'm'e's''''''''''''''''''''''''' 't''' 's's'i'l'''''T'D'R'C' 'l'l'a' ','s't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'o'n' 'e'r'a' 'e'r'e'h't' 'n'e'h'W'''''' 'A'T'A'Y' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''r'''''e'''h't'o' 'h'c'a'e' 's'a' 't's'a'f' 's'a' 't's'u'j' 'n'u'r' 's'm'h't'i'r'o'g'l'a' 'h't'o'b' 't'a'h't' 'n'o'i't'p'm'u's's'a' 'e'h't' 'n'o' 's't's'e'r' 's'i'h'T''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'''''e'l'b'a'g'n'a'h'c''''n'r'e't'n'i' 'e'r'a' 's'm'h't'i'r'o'g'l'a' 'e'h't' '''f'i' 'e's'n'e's' 's'e'k'a'm' 'y'l'n'o' 's'i'h'T' ''y'l'b'a'g'n'a'h'c'r'e't'n'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'f'o' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h't' 'g'n'i'r'a'p'm'o'c' 'y'l't'c'e'r'i'd'''''''''''''p'm'o'c' 'm'''I''''''''''''''''''h't' 'n'e't't'i'r'w' 'e'v'''''''''''''''''''''''''''''''''''''''''''','s'r'e'b'm'u'n' 'h't'i'w' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'n'e'r'e'f'''''''''''''''''''''''''''''n'o'i't'a't'n''''' 'e'h't'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''['''''''''''''''']''''''''''''''https://github.com/josephg/reference-crdt')'s'(']''''''''''''''''''''''''''' ','e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't''''''' 'a' 'h't'i'W'''''''''''''''''''A' '.'s'i' 't'i' ','''' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'T'D'R'C' 'e'c'n'e'r'e'f'e'r' 'y'm' 'n'i' 'e's'u'a'c'e'b' '-' 'l'a'c'i't'n'e'd'i' 's'i' 'd'e'e'p's' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'h't''''''''''''''''''''''' 'e'r'a' 's'm'h't'i'r'o'g'l'a' 'h't'o'b' 't'a'h't' 'm'e'l'p'm'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'o'i't'p'm'u's's'a' 'n'' 'a' 'g'n'i'k'a'm' 'm'''I'''''''''' 'm'i'a'l'c' 'y'M'''''''''''''''''''i' 's'i'h'T' '.')'e'd'o'c' 't's'u'r' 'y'm' '+' 's'j'y'(' 'A'T''''''''''A'T'R'A'Y' 'd'n'a' ')'e'g'r'e'm'o't'u'a'(' 'A'G'R''''Y' ':'f'i'd' 'e's'u' 'h'c'i'h'w' 's'n'o'i't'a't'n'e'm'e'l'p'm'i' 'g'n'i'r'a'p'm'o'c' 'y'l't'c'e'r'i'd''''''''''''''''''''''''s'c'i't'n'a'm'e's'''''''r'i'o'g'l'a' 'T'D'R'C' 'o'w't' 'h't'i'w' 'e's'o'o'l' 'd'n'a' 't's'a'f' 'd'e'y'a'l'p' 'e'v'''I'''''''''''''''''''''''''b' 't's'o'p' 's'i'h't' 'n'e't't'i'r'w' 'e'v'''I'''''''''I' '.'1'n'n'.'u' 's's'e'f''''''''''''''''''e'f'n'o'c''''f'''''''''''''''''d'n'e'f'e'd' 'd'n'a' ''''''''''''e'f'e''''''i't's'u'j' ','t'i'm'd'a' 'o't' 't'n'a'w' 'I' 't'a'h't' 'e'v'o'b'a' '''T'''''''''''''''''''''''''''''''''s'd'n'a'h' 'f'o' 's't'h'g'i'l's'''''''' 's'h't'i'l'g''''''''''i'g'l' 'w'e'f' 'a' 'e'n'o'd'''''''a' 'e'n'd'o' 'e'v'''I'n'n's'k'r'a'm'h'c'n'e'b' 'h't'i'w' 'g'n'i'y'L' '''' ':'A''''X' 'g'n'i'd'n'e'p'p'A' '#'''''n'n'n'.'u'o'y' 'r'o'f' 'g'n'i'm'o'c' 'e'r'''e'W' '?''D'''''''''''''''''''''''''''''''g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'e'm'i't'l'a'e'R''''P'2'P' '.'w'o'n' 't'i' 'd'n'u'o'f' 'e'v'''e'w' 't'u'B'n'n'.'e'd'i's'n'i' 'e'r'u's''''t'a'e'r't' 'e'h't' 'd'n'i'f' 'o't' ''''s'e'd'a'c'e'd' 'r'e'h't'o'n'a' 'e'm' 'k'o'o't' 't'i'''''''' 't'''n'd'i'd' 'd'n'a' ','e'v'a'c' 's'''n'o'g'a'r'd' 'e'h't' 'r'e't'n'e' 't'''n'd'i'd' 'I' ''''''''''''''''i'd' 'I' '.''''''' '.'y'a'w'a' 'd'e'n'r'u't' 'per was really a call to adventure. It was the world saying was saying 'Hey Seph, we need your help over here. Your skills are a piece of this puzzle, and we can't get it working without you.' In my youthful arrogance I'''''t'a'h'T''''''''''' 'y'l'l'a'e'r''''''''''''''''''e'h't' '''''' 's'a'w' 't'I'''''S''''''''''''''''''''''''''''''''''''''''''''''''''e'r'a' 's'l''''s'l'i''''''''''''''''''''''''''''''''''''''''''u'o'y' 't'u'o'h't''''''''''''' 'I' 'e'c'n'a'g'o'r'r'a'i'w' 'g'n'i'k'r'o''''i'w''''''''g'n'i'k'r'w'o' 't'i' 't'e'g' 't'''n'a'c' 'e'w' 'd'n'a' ','k's' 'r''''''''''''''''''''''''''''s'i'h't'''''''''''''''''' 'l'u'f''''n'h't'u'o'y'''''''u'o' 'y'm' 'n'I' ''''''''''e'l'z'z'u'p' 'e'h't' 'f'o' 'e'c'e'i'p' 'a' 'g'n'i'd'l'o'h' 'e'r'''u'o'Y' '.'e'r'e'h' 'r'e'v'o' 'p'l'e'h' 'r'u'o'y' 'd'e'e'n' 'e'w'''''''''' 'e'W'''''''' ','h'p'e's' 'y'''' 'e'H''''''','t'i'r'i'p's' 's'i'h't' 'n'I'' 't'a'h't' 't'a'h'w'''''''h't' 't'u'o' 'e'r'u'g'i'f''''''''t'''T'''''''''''''''''''''''''''''''''''T'''''''''''''''''''''''''g''''h'n'i'y'a's' ''''''''''''.'e'r'e'h' 'd'e'd'e'e'n''''''''''''n'a' ''''''''''W' '.'e'l'b'a'u'l'a'v''s'a'w' ''''''''''''''''''''''''''''''''''''''e'r'a'r' 'e'r'a' 's'l'l'i'k's' 'r'u'o'Y''' 'g'n'i'y'a's' 'd'l'r'o'w' 'e'h't' 's'a'w' 't'a'h'T' '.'''' 'e'r'u't'n'e'v'd'a' 'o't' 'l'l'a'c' 'a' 's'a'w' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'v'a'h''''n' 'd'l''''d'u'o'h's' 'I' ','r'e'p'a'p' 't'a'h't' 't'a' 'd'e't'a'r't's'u'r'f' 'g'n'i'e'b' 'f'o' 'd'a'e't's'n'I'n'n''i' 'd'n'i'f' 'n'a'c' 'e'w' 'f'i' ','''d'l'r'o'w' 'e'h't' 'r'o'f' 't'f'i'g' 'n'w'o' 'r'u'o''h'd' 't'n'e'r'e'f'f'i'D' ''''''' 'e'W' ''''' '.'o'g'a' 'e'd'a'c'e'd' '''a' 's'T'D'R''''D'C' 'e'l'b'a'k'r'o'w' ','t's'a'f' 'd'a'h''''f' 'e'v'a'h' 'd'l'u'o'c' 'e'w' ','d'i'd' 'I' 'f'i''''''' 'I' 'd'n'A''''''!'s'p'o'O' ''''a'm'e's' 'T'D'R'C' 'g'n'i't'n'e'v'n'i' 'f'o' ' 'e's'u''''''*'''''''''o'h'w' 'w'o'n'k' 't'''n'o'd' '''''''''' 'm'''I'''''''''''''' ''''m''''t'u'o' 's'n'r'u't' 't'I''u's''''''''''''''''''''''''''''''''''''''''''''''.'e'g'r'e'm'e' 'o't' 'd'e't'r'a't's' 's'T'D'R'C''''''''''''r'e't's'a'f' 'h't'i'w' ''''''' 's'd'o'h't'e'm' ')'(''''''''''''e'k'i'l' 'd'e''''d'm'e'e's''''''''''''''''''''''''''''''''''e'r'''y'e'h'''''''!'w''''1'o'n' ''t' 'd'n'a' '-' 'l'a'e'd' 'g'i'b' '''y'l'a' '''''''''''''''''''''''''''''''''''''''''''''A''''''''''''''''''''''''''I'''''''d'e'm'u's's'a'' '-' 'e'k'a't's'i'm' 'g'i'b' 'a' 'e'd'a'm''S' ''''''''''''' 'a' 'e'd'a'm' ' '''''.'''','''g'''n'i't'i'd'e' 'd'l'r'o'w' 'l'a'e'r' 'r'o'f' 'e'l'b'a's'u''''i'n'u' 'y't't'e'r'p'''' 'a'e'r'e'w' ''e'''t'a'd'p'u'_'h'c't'a'b' 'a'''''''''''''''''''''''''''''''''''''''''.'e'c'n'a'm'r'o'f'r'e'p' 'e'r'o'm' 'n'e'v'e' 'r'o'f' 's'e'i't'i'n'u't'r'o'''''''o'p'p'p'o'''''''''''''''''''' 'e'c'n'a'm'r'o'f'r'e'p' 'r'e't's'a'f'''''e'r'o'm' 'l'l'e'm's''''' 'n'a'c' 'I''''''''k'o'o'l' 't'I' '''u''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''t'i'd'e' ''g'n'i's's'e'c'o'r'p' 'y'b''''''''''''''''''''''''''''''''''e'm'i't' 'a' 't'a' 'r'e't'c'a'r'a'h'c' 'e'n'o' 'g'n'i't'r'e's'n'i' 'e'h'c'a'c' 's'''U'P'C''''''''''''''''c' 'U'P'c' 'e'h't' 'g'n'i'h's'a'r'h't' 'y'l'b'a'b'o'r'p' 'm'''I''' 'I''j' '''''''''''''''l'l'i'f' 'y'l'b'a'b'o'r'p' 'd'n'A'n'n''r'o'w' 's's'e'l' 'o'd' 'r'e't'u'p'm'o'c' 'e'h't' 'e'k'a'm' ''a'c' 'e's'u' 'f'o'''Oh look - 29ms + 23ms != 65ms. We're''''''''''k'o'o'l' 'h'O''''''''''''''''''''''''''''''''''''''' 'e'r'''e'W''''''''''''''''' '''' 's't'i' 'f'i' 'r'e'd'n'o'w' 'I' '.'s'm'5'6' '='''' '!' 's'm'3'2' '+' 's'm'9'2' '-' 'd'r'i'e'W''''''''''' 't'''n'o'd''is it'''''''''' 'o't' 'r'e't's'a'f' slower''d'''''''''''''r'e'w'o'l's' 't'i' 's'i' 'y'h'W'(''''('n' 'h'c'n'u'b' 'a' 's'''e'r'e'h'T''''''''''''''''''s'n'o'i't'a'c'i'l'p'p'a' 't's'o'M''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'e'h'w' 'e'k'i'l' '-' 'l'l'a' 't'a' 't'n'e't'n'o'c' 't'x'e't' 'e'h't' 'd'e'e'n' 't'''n'o'd' 's'e'm'i't'e'm'o's' 'e'W' '-'n'''''h't' 'f'''o' 'e'z'i's' 'e'.''h't' 's'e's'a'e'r'c'n'i' '''o's'l'a' 't'I' '''''''''' '''''''''''''''''''y'e'p'o'r' 'n'o' 'g'n'''r'u'o''i'd'n'e'p'e'D'o'T''' '''''''' 't'n'e't'n'o'c''e'''I'm still not sur''''''''''''''''''''''''''''''.'h'c'a'o'r'p'p'a' 's'i'h't' 'e'k'i'l' 'I' 'r'e'h't'e'h'w'''''''''''''''''''''''.'e'g'n'a'h'c' 's'i'h't' 'e'k'i'l' 'I' 'f'i' 'e'''''''''''''''''''' 'e'r'u's' 't'o'n' 'l'l'i't's' 'm'''I'n'n''''''''''''''''''''' 'e'w' 's'e'm'i't'e'm'o'S' '-'n'''''''''''''''''''''''''''' 'n'o'i'''''''''''''''t'n'i'o'p' 's'i'h't' 't'a' 't'a't'n'e'm'e'l'p'm'i' 'T'D'R'C'.''e'r'T'e''''''''''''''' 'y'e'p'o'R'''''''''''s'i'''''d'n'a' ' 'h'''''''''''''''s'''t'n'e'm'u'c'o'd' 'e'h't' ''c'i'h'w' '-' ''''g'n'a''n''''e't'o'N'''''''''''t'x'e't' 'e'h't''''''''''' 'e'n'O' // No string conte''nt!'R''''''''''' 'g'i'b' 'e'n'O''''''''''''''''''''''''''''''''''''''''''''''t'u'B' ''''''''''''''' 'r'a'l'u'c'i't'r'a'p' 'n'i'.''''''''n''' ''''''''''''''''''''e'h't' 'h't'i''''''.'e'r'e'h' ''''w' 'd'i'd' 'I' '''t'a'h'w'''t''t'u'' ','''''''''''''''''''''''''''''''''''''''''''''''''''a't'a'''d' ''''''''''''''''''''''''''''s't'n'e'm'e'l''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''''''''''''''''''.''''''''''''''''''''''''''''''''' 'e'h't'''''''''''''''''''''''''''''''''''''''''e'h'T'''''''''''''''''s'e's'a'e'r'c'n'''- It also makes it way faster to read off''''I'''''o's'l'a' '| *JS baseline* | 0.61s | 0.1 MB | *(none)* |'| Rust (Called from JS via WASM) | 0.20s | ??? | B-Tree |'| Rust (native) | 0.065s | 2.3 MB | B-Tree |n'n'n'''''''''''''')'t's'u'r'''''''''''''''''''9'''2''2'''0''''''(' 'y'e'p'o'R''''''''''''''''''''''''''''''''''''''''''''' 'f'f'o' 'd'a'e'r' 'o't' 'r'e't's'a'f''''a' 'y'a'w' 't'i' 's'e'k'a'm' 't'i' 't'u'B' '-'n'i'''''''''''''''''''''''''''.'y'e'p'o'R' 'n'o' 'd'n'e'p'e'd' 'e'w' 'n'e'h'w' ''''''''''''''''''''''''''.'b'k'0'2'1' 'o't' 'b'k'0'6' 'm'o'r'f' 's'e'o'g' 'e'l'd'n'u'b' '.'b'e'w' 'e'h't' 'n'o' 's'r'e't't'a'm' 'h'c'i'h'w' ','''''''''''''' 'm's'a'w' 'h't'i'w' '-' 'y'r'a'n'i'b' ' 'f'o' 'e'z'i's'''''''''d'e'l'i'p'm'o'c' 'e'h't' 's'e'l'b'u'o'd' 't'i''''''b' 'e'h't' 'd'n'A' '''''''''''''''t'a' 'd'e'v'i'r'r'a' 'y'l'e't'a'n'u't'r'o'f'n'u' 'e'v'a'h' 'e'W''n'i'w' 't'e'n' 'a' 't'''n's'i' 's'i'h'T' '.'''s't'r'e's'n'i' 't'x'e't' 'e'g'a'n'a'm' 'y'l't'n'e'i'c'i'f'f'e' 'o't' '''' ''''''t' 'p'''m'''i' 'y'e'p'o'R' '.'''''''''''''''''''''''''' 'd'''''''d' 'e'l'l'a'c' 'y'r'a'r'b'i'l' 't''''''''''''''''''''''''''''''''''''!'e'e'r't'-'b' '*'r'e'h't''''''''''''''e'l'b'a't'r'o'f'm'o'c'n'U' ''o'n'a'*' 's't'n'e'm'e'l'p''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'''''o't' ''w'o'l'l'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t's'u'j' ''''''''''''''''''''''''''-''' '-'n'''r'e''''''' 'e's'a'c' 's'i'h't' 'n'i''''''''''''''''''''''''''''''e'b' 'd'l'u'o'c' 't'i' 's'a' 'w'o'l's' 's'a' 'e'c'i'w't' '''' '''''''''''''''''''''''''''n'a'h't' 'e'r'o'm' 'g'n'i'h't'y'r'e'v'e' 's'e'k'a'm' 'h'c'i'h'w' ','1' 'f'o' 'd'a'e't's'n'i' ''''''''''''''''p'o'R' '.'s'e'r'u't'c'u'r't's' 'a't'a'd' '2' 'e't'a'd'p'u' 'o't' 'd'e'e'n' ''''''e'w' 't'r'e's'n'i' 'h'c'a'''''''h'c'e' 'h't'i'w'''''''i'e''''''''''''''''''''h't'o'b' 'o't'n'i' 'g'n'i't'r'e's'n'i' 't'u'B' '''''''''''''''''''''''''''.'y'a'w' 's'i'h't' 'm'a'r' 's's'e'l' 't'o'l' 'a' 'e's'u' 'e'w' 's'i' 'e'g'a't'n'a'v'd'a' 't's'e'g'g'i'b' 'e'h'T''''''''''''''''''''''-''' '-'n'.'m'a'r' 's's'e'l' 'e's'u' 'e'w' 'o'S' '.'''''''''''''''''''''''''''''a'r'a'h'c' 'e'h't' 'l'l'a' 'g'n'i'k'c'a'p' 'e'k'i'l' ','''''''''''''''''''''''''''''''''''s'n'o'i't'a'z'i'm'i't'p'o' 'c'i'f'i'c'e'p's'-'t'x'e't' 'o'd' 'n'a'c' 'y'e'p'o'r''''' 'e'h't' 's'n'a'e'm' 's'i'h't' 'e'k'i'l' 'd'e'n'i'a't'n'o'c' 'f'l'e's' 't'n''''e't'n'o'c' 't'x'x'e't' 'e'h't' 'g'''' 'n'i'v'a'H' ''m'i'''''''''''''*' 's'''' 'i' 'h'c'i'h'w' ','')''s'u'r' ''''''''''''''''t's'i'l' 'a' 'g'n'i's'u''''U''[Ropey](https://docs.rs/ropey/1.2.0/ropey/)'(' ''''''' '''' '('e't'a'r'a'p'e'''''L''''''''''''''''''''''''T''' 'g'n'i'r'e'e'n'i'g'n'E' 'f'o' ''''s'd'n'a'l' 'e'h't''s' 'a''' '''''''''''''''''''''''''''''' 'o't' 'e'm'o'c'''''''m'o'l'e'W'''''''''''''''''[Ropey](https://docs.rs/ropey/1.2.0/ropey/)''''''''''-''' '-'n'n':'f'f'o'e'd'a'r't' 'a' 's'i' 's'i'h'T''''''''''''' 't'i'f'e'n'''''''n'e'e'b' 'e'h'T' '.'e'r'u't'c'u'r't's' 'n'w'o' 's't'i' 'o't'n'i' 't'u'o' 't'i' 'd'e'l'l'u'p' '''''''''' 's't'I' '?'t'n'e't'n'o'c' ''b' ','e'r'e'h' 's'k'a'e'w't' 'l'l'a'm's' 'f'o' 'h'c'n'u'b' 'a' 's'''e'r'e'h'T''''''''''''''''t'x''''t'e't' 'e'h't' 'e'c'i't'o'N'n''''''''''''''''''''''''''''''''''''' 't'u'b' ','e'r'e'h' 's'k'a'e'w't' 'w'e'f' 'a' 's'''e'r'e'h'T'n''n''''''n''m'e't'''''T'O'''O'R'''''l'l'u'n'''''''''''''L'L'U''n { length: 5, id: [0, 0], seq, parent: ROOT },'N'i' ',']'''e'k'i'''''''''i'''m'm''''' ','''h'p'e's''''n { length: -5, id: [1, 0], seq, parent: [0, 0] },'[' ':'s't''n ...'n'e''0'i'n ]},''l''n'c' 'i'h''}'t'e'm'''''''1'-'''''''''''''' 't'o'o'r' '/'/' ' ',''''''''''']''''''''''''''{' 'e'p'''}' 'o'R' 'y'' 'e'p'o'''R''0' ',''''''''''-' ','1'-'[''''o's' '''''''''''''''''''''' 'f'1''o'''''n```javascriptndoc'n ''' ='0' { co' 'nten'n '''''''''''''''''' '''''!'t'n'e't'n'o'c' 'g'n'i'r't's' 'o'N' '/'/' 't: [n' ''''''''''5''' ':'h't'g'n'e'l' { item: 'hello', i' 's'' ''''n'''''''''''''''''''''''''''''''''''''''r''''''''''''''''''''''.'g'n'i'r't's' 'a' 't'o'n' ','e'p'o'R'''''e'p'o'r' 'a' 'n'i' 'y'l'l'a'u't'c'A' '/'/' '''o'l'l'e'h''' ':'t'n'e't'n'o'C't'x'e't' 'n ' ',''''n ''n '''Del''''''''' '''5'''-' ':'h't'g'n'e'l'''eted: false, id: ['seph', 0], seq, parent: null },n { item: 'world', isDeleted: true, id: ['mike', 0], seq, parent: ['seph', 0] },n ...n]}n```'n''n' 't'n'e'l'a'v'i'u'q'e' 'e'h't'''''']'0'n ''''' ''''''''''''''''''''''''''''''':'s'i'h't' 'g'n'i'o''nIn javascript we have this:nn```javascriptndoc = { content: [n { item: 'hello', isDeleted: false, id: ['seph', 0], seq, parent: null },n { item: 'world', isDeleted: true, id: ['mike', 0], seq, parent: ['seph', 0] },n ...n]}n```n'd' 'm'''I' 't's'u'r' 'n'I'n'n'`'`'`'n'}'n ']'n '.'.'.' '' ','''h'p'e's'''[''''{' ''''{'''='''['''p'''''n'.'i'r'c's'a'v'a'j'''''''' '=' 'c'o'd''{ item: 'hello', isDeleted: false, id: ['seph', 0], seq, parent: null },'n'`'`'`'n'n':'s'i'h't' 'e'v'a'h' 'e'w' 't'p'i'r'c's'a'v'a'j' 'n'I'n'n'.'t'i' 'e'k'i'l' 'I' 'f'i'''''''''e'k'i'l' 'I'f'i' 'e'r'u's' 't'o'n' 'm'''I' 'd'n'a' '-' 'e'g'n'a'h'c' 'l'l'a'm's' 'r'e'h't'o'n'a' 's'a'h''''''t'''n's'i' 'n'o'i't'a't'n'e'm'e'''''''e'm'l'p'm'i' 's'i'h'T' '.'''''''''''''t' '-' 'e'r'e'h' 'd'n'a'h' 'f'o' 't'h'g'i'l's' 'a' 'g'n'i'o'd' 'm'''I'n''n''t'c'u'r't's' 'f'o' 'y'a'r'r'A' 's'v' 's'y'a'r'r'a' 'f'o' 't'c'u'r't'S' ''''#'#'#''''''''''''''''''''''''''''''''''''a' 's'e's'u' 'n'o'''''''''h'c'a'o'r'p'p'a' ''i't'a't'n'e'm'e'l'p'm''''''''''''''''''''''''''''''''''''''e'l'o'h'w'''''''''''''s'k'o'o'l' '''e't'e'l'p'm'o'c' 'e'h'T''''''''''''h't'g'n'''e'{id, length, parent}''l' ','''''''''''''n'e'l' ''''''''''''''.'.'.' ','t'n'e'r'a'p' ','d'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'c'n'a'f' ''''''''' '.''''''''''''''''''''''e'r'e'h' ''''''?'t'i' 't'e'G' '.'')'s'g'n'i'r't's' 't''''''''''''''''''''''t'a'e'r'g' 's'k'r'o'w' 'h'c'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'g'n'i''''''''''' 't'o'n' 's't'I''W'''''h't' 'g'n'i't'a'd'p'u'''''''''y'e'p'o'r''''''y'e'p'o'r' 'n'i' 't'n'e'p's' 's'i' 'e'm'i't' 's'''m'h't'i'r'o'g'l'a' 'e'h't' 'f'o' 't's'o'm''t'a''''''''''''''''''''''''g'n'i't'a'n'i'm'o'd' 'y'l'l'a'u't'c'a' 's'i' '''' 'h't' 't's'a'f' 'o's' 'h''''''''''k'r'o'w' ','''r'''a'm's' 'e'r'a' 's'e'p'o'R''''''t'r'a'm'S'(' '.'''' 'y'r'a'r'b'i'l' 'e'p'o'r' 'a' 'o't'n'i' 't'u'o' 'd'e'l'l'u'p' 's'i' 'f'l'e''''''''''f'e'l's't'i' 't'n'e't'n'o'c' 't'x''''t'e't' 'e'h't' 'l'l'A'n''n'}'{''' '.'t'n'e't'n'o'c' 'g'n'i'r't's' 'e'h't' 'r'o'f' ''i' 's'i'h'T'n't'''n''a' ''u'h' 'r'e'g'n'e'v'a''Y' ''c's'''''''''''''''''''''''''''''''''''''''''''''''*''''''''''''''''''''''''''''''''''''''''''''''''''.'t'i' 'n'o' 'e't'o'n' 'l'a'u't'c'a' 'e'h't' 'h't'i'w' 'r'e'p'a'p' 'f'o' 'e'c'e'i'p' '*''''''''''''''''''''''''''''''''''''''''''''e'g'r'e'm'o't'u'a' 'n'a'h't' ''''''''''''''''''''''''''''''''''.'d'n''''''''''''''''s'i' ','s'd'n'I'm''''''''''''t'i'b' 'e'l't't'i'l' 'a''' ''k''i''n''d'' ''of grateful for that silly academic paper now. I used to think'' that a'''''''e'r'e'w' 'cademics''''''''''''''''''''''''''''''''''d'n'u'o'r'a' 'e'l'p'o'e'p' 't's'e't'r'a''''''s'g'u'm' 'm's' 'e'''h't' '''''''y'l'l''''j'a'e'r' ''e'b' ''''''''''''''''''''''e'v'i's'''''''s'i's'a'm' 'a' 't'a'h't' 's'I'(' '''''''''''''''' 'o'g'a' 'e'''d'a'c'e'd' 'A'''''''''''s'''g'' So'''u''''''''y'l'l'a'e'r' 'm'''''''''g'n'''''e'[''h't'''https://hal.inria.fr/inria-00432368/documen')'t'('['']'''https://hal.inria.fr/inria-00445975/documen')'t'(']''' 'i'l'''''''''''''o'g'a' 's'r'a'e'y' '2'1' ''d'd'''''''s'T'D'R'C' 'i'm' ''''t's'u'm''''''r'i'''''''''''''o'S'''''''o's' ''''''''' 'e'h'''''r'o'f' 't''''Google wave, a'''''''''''''y't'i'l'a'u'''''''''y'l'l'a't'o'''''''''''''''''''b'a'l' 'e'h't' 'f'o' 'e'd'i's't''' 'o's''u'o' ''t''''''''''''''''''n'''''''''''''''''''''''''''''''''.''But I was wrong. I might not be any good at inventing CRDTs, but I am pretty good at making code run fast. A''nd here, in my own field, I *didn'''''''''e'g'n'a'r'''''''''''''e'g'a'r't's' 't even try* to help those academics improve their implementations. They were doing their part in this dance, and I wasn't doing mine. They figured out the semantics, but they'm'e'h't' 'd'e'r'o'n'g'i' 'I' 'd'n'A''''''''''''''''''''m'e'h't' 'd''''''''''''''''''''t''''g'n'i'''a''' 'd''''d'n'A'o'o'g' 'y't''''y','''',''t'e'r'p' 'm'a' ''''o'd' ''e'r'''n'g'i'''''''''''''r'i'e'h't' 'e'v'''o'r'p'm'i'' 'I' 'o''really'''''''''''''''''''''''''''''''''','d'l''''''''''''''''''''''''''''''''''''''''''' 'y'''' 'e'h't' 't'u''''''''''''''''t' 't'u'n'b''''''''''''''''t' 't'u'n' ','s'c'i't'n'a'm'e's''''''''''s'c'i't'a'n'm'e's' 'e'h't' 't'u'o' 'd'e'r'u'g'i'f' 'y'e'h'T' 'e'i'f' 'n'w'o' 'y'm' 'n'i' ','e'r'e'h' '''''''''r'i'e'h't' 'y'''''''''''l'l'e'w' 'k'r'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''A' '.'y't'i'c' 'e'h't' 'r'e'v'o' 'g'n'i's' 'o't' 'g'n'o's' 'a' 's'a'h''''a' 's'u' 'f'o' 'h'c'a'E''''''''''''''''''''''''''''''''''''g'n'i's' 'o't' 's'g'n'o's' 't'n'e'r'e'f'f'i'd' 'e'v'a'h' 'l'l'a' 'e'W' '.'s't's'e'r'e't'n'i' 'd'n'a' 's'e'i't'i'v'i'l'c'o'r'p' 't'n'e'r'e'f'f'i'd' 'e'v'a'h' 'o'w' 'l'd'i'p'u't's'''''''y'l'l'a'e'r' ''''''''''''''''''I think the idea that everyone has some hidden talent is tosh. But I do think we all'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'l'l'a' 'e'w' 'k'n'i'h't' 'o'd' 'I' 't'u'B' '.'''''''' 'f'o' 't'i'b' 'a'''''h's'o't' 's'i' 't'n'e'l'a''''e't' 'n'e'''''''e'n'd'd'i'h' 'e'm'o's' 's'a'h' 'e'n'o'y'r'e'v'e' 't'a'h't' 'a'e'd'i' 'e'h't' 'k'n'i'h't' 'I''''I''''''' 'I'.' 'I' 'o'S' '''''' 'g'n'i'b'i'''''''''d'o'o'g' 'e'k'a'm''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'n'i'm' 'g'n'i'o'd' 't'''n's'a'w' 'I' 'd'n'a' ','e'c'n'a'd'''i'b' 's'i'h't' 'n'i' 't'r'a'p' 'r'i'e'h't' 'g'n'i'o'd''''t' 'e'r'e'w' 'y'e'h'T' '''r'c's'e'd' '''''''''''''''''''''''''''''''''''''''''''''t's'u'j' ''''''''''''''''''d'e'r'u'g'i'f' 'I' ''''''''''''''''''''''''''''''''''''''''''''I' 't'u'B'''''''''''''''''''''''''''''t'a' 'd'''g'n'i'','b'''''''''o'o'g' 'y'n'a' 'e'b' 't'o'''''''''*'''''''''''''''*'''*'''''*'''''''''''''''''''''''''''' 's'''''''''''''''''''s'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''''''''''''''''''.'s'm'h't'i'r'o'g'l'a' 'r'i'e'h't' 'p'u' 'x'i'f''''''''' 'e'v'o'r'p'm'i' 'd'n'a' ''c'i'm'e'd'a'c''''l'a' 'e's'o'h't''''t'u'o' 'p'l'e'h' 'o't' 'y'r't' 'n'e'v'e' 't'''n'd'i'd' 'I' 't'u'B' '''n''''''''''''y'e'h'T' '.'e'r'e'w' 's'm'h't'i'r''''''''d'n'a' '-' ''''o''''i'g'l'a'''''''''' 'm''''''''''''h't'r'i'o'g'l'a' ''''''''''''''''''''''''''''''''' 'o'''''t's'''''' 'w'o'h' 'a'e'd'i' 'o'n' 'e'v'''''''y'l'l'a'''e'r'''''''' 'y'l't'''''''''e'n'o'y'r'e'v'e' ''e'i'u'q'' ''a'h' 't'''''''''.'e'r'e'h' ''''''''''''''''m' 'o't' ''''''''''''' 'n'i' '''h''''''''''e'n'o'y'r'e'v'e''g'i'm' 'I''M''''''''''m''' 'f'''''''''''''''''''''''''''''''''''''''' 'f'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'.'t'r'a'p' 'y'm' 'g'n'i'o'd' 'd'n'a' 'p'u' 'g'n'i'w'o'h's' 't'o'n' 'y'''' 'b' 'n'r'u't' 'n'i' 's'c'i'm'e'd'a'c'a' 'e'h't' 'n'w'o'd' 'g'n'i't't'e'l' 's'a'w' 'I' 'd'n'A' '.'t's'a'f' 'n'u'r' 'e'd'o'c' 'e'k'a'm' 'o't' 'w'o'h' 'w'o'n'k' 'o'd' 'I' 't'u'B' '.'o' 's'e's's'a'l'c' 'w'e'n' 'g'n'i't'n'e'v'n'i'''''T'D'R'C' 'e'b' 't'o'n' 't'h'g'i'm''''''t'''n's'i' 'o' 't'''''''t' 'r'a'P'''''''''''''''''''''d'l'r'o'w' 'e'h't' 'o't' 't'f'i'g' 'y'M' '.'r'i'e'h't' 't'n'e'i'c'i'f'f'e'n'i' 'd'n'a' 'w'o'l's' 'w'o'h' 'd'e's'i'l'a'e'r' 'I' 'n'e'h'w' 't's'u'd' 'o't' 'd'e'n'r'u't' 't'n'e'm'e't'i'c'x'e''''''''''' 't'n'e'm'''''''''''''''' 'n't'm'e't'i'c'x'e' 't'a'h't' 't'u'B' '.'s'r'e'p'a'p''e'h'w' 'd'e't'i'c'x'e' '''t'o'g' 'I'''''w''' 'o'S''''''''''['''''' 'e'v'a'w''''''''''https''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''h'c'u'm'r'' 'o''''''d'o'o'g'W'' 's' 'n'e'e'b' 'e'v'a'h' 'd'l'u'o'w' 'g'n'i'h't' 'e'l'o'h'w' 'e'h'T'y'l'r'e'p'o'r'p' 'd'e'k'r'o'w' 'r'e'v'e'n' 't'i''''''''''''''''I' '.'y'g'g'u'b' 'y'l'l'a'e'r' 'd'n'a' '''' '://web.archive.org/'''''''''''''''''''''''''''''e'l'b'a'k'r'o'w'n'u' 'e'r'e'w' 'y'e'h't' 'w'o'l's' '''' 'o's' 'web/20130330144116/http://www.waveprotocol.org/federatio')'n'(''''https://web.archive.org/web/20130330144116/http://www.waveprotocol.org/federation']'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''w''' 'o'S''''''t''a'b'''''''b'''u'B' '.'T'D'''t'o'g''R'C' 'a'''''''a' ' 'h't'i'w' 'e'l'p'm'i's' ''''''' 'd'n'A''''''''''''''''''''''''''''''''''''''''''''''''''''''' ','o'''f'''' 'e'h't''''i' ''g' ''''''h't''r'e'v'e' 'd'l'u'o'c' 's'm'h't''n'n''''i'r'o'g'l'a' 'e's'o'h't' 's'a' 't's'a'f' 's'a' 's'a'w' 't'a'h't''''''''a'c'a' 'e'h't' ''o''''''''''''a' 'e'h't' 't'n'a'e'm''''a'e'm' ''s' 'n'e'e'b' 'e'v'a'h''''b' 'd'l'u'o'w' 't'i' 'd'n'a' ','s'r'e'k'n'o'b' 's'a'w' 'l'e'd'o'm' 'n'o'i't'a'r'e'd'e'f' 'r'u'O' ''q' 'd'o'o'g' 'll those years ago, really ne'B'eded a hi''''''''''''''''o't' 'e'g'a'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'u'b' '-' 'd'e't'i''''e'c'x'e' 's''.'''a'w' 'I''''''''''''''''' 'e'h't'''''''''''d'e'v'l'o'v'n'i' '''''''''''''''''''''''''''' ','y'l'w'o'l's' 'y'l'l'a'e'r' 'n'a'r' 's'm'h't'i'r'o'g'l'a' 'r'i'e'h't' 'd'n'a' 't'u'o' 'e'm'a'c' 'T'O'O'W' 'd'n'a' 'T'O'O'G'O'L' 'e'k'i'l' 's'r'e'p'a'p' 'n'e'h'W''a'm' 't'''n'd'i'd'gh performance list CRDT. And back then I wasn't smart enough to invent one. I assumed that because academics couldn't make their CRDTs run fast, nobody could. That was wrong - my forte isn't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'c'n'a'm''''''''''''''''n'e'h't' 'k'c'a'b' '' 'd'n'A''''''''''''''''''''''''''t'a'h'''t''' 'd'e''''''''''' '''''''r'i'e'''''n'u'r' '''h't' 't'''''''''''''''''''''''''''''''''''' 't'''n's'i' 'e't'r'o'f' 'y'm''''''' 'I' '-' 'g'n'o'r'w' 's'a'w' 't'a'h'T' '''n'n'''n'd'l'u'o'c''m'u's's'a' 'I''''''''''''''''''''''''''''''''' 't'u'b' ','f'l'e's'y'm' 'f'o' 'y'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''n'i' 'o't' 'h'g'u'o'n'e' 'r'e'v'e'l'c' 'e'b'''''''''' 'e'm' 't'o'n' '' ','t'u'B''''''''t'h'g'i'm' 'I' '''''' '.'d'l'u'o'c' 'y'd'o''''d'b'o'n' 'd'e'm'u's's'a' 'I' ','t's'a'f' 's'T'D'R'C' 'e'k'a'm' 't'''n'd'i'd' 's'c'i'm'e'd'a'c'a' 'e'h't' 'e's'u'a'c'e'b' 'd'n'A' ''''' 'o'S' '''' '.'n'e'h't' 'k'c'a'b' ''h'g'i'h' 'y't't'e'r'p' 'k'n'i'h't'''''''i'l' 'I''''''''''''''''''''''''''''''''''''e'n'o' 't'n'e'v'n'i' 'o't' 'h'g'u'o'n'e' 't'r'a'm's' 't'''n's'a'w' 'I' '.'r'o'f'r'e'p' 'h'g'i'h' 'd'e'd'e'e'n'''''''a'w' 'y'l'l'a'e'r' ','''' 'o'g'a' 's'r'a'e'y' 'e's'o'h't' 'l'l'a' ','e'v'a'w' 'e'l'g'o'o'G''''''''a'e'r'a' 't's'e'r'e''''''''''''''e'v'a'W' 'n'o'''''''''''''''''''' 'a' 'd' ''''e'd'e'e'n' 'y'l'l'a'e'r' 'e'W'''''''''''''''''''''''''''' 's'T'D'R'C''''''''''D'R'c' 't's'i'l' 'd'e't'n'a''''a'w' 'y'l'l'a'e'r' 'I''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'r'o'f' 's'c'i't'n'a'm'e's' 'e'h't' 't'u'o' 'e'r'u'g'i'f' 'o't' '' 'h'g'u'o'n'e' 't'r'a'm's' 't'''n's'a'w' 'I't'''''''''''''''''''''Invent''''''T'D'R'C' 'a'''ing the semantics for peer-to-peer concurrent editing sounds terrifying a CRDT'''''''''''''''''''''''''''''''''''''''''' 'r'e'e'p'-'o't'-'r'''''''''''''''''g'n'i'y'f'i'r'r'e't' 's'd'n'u'o's''e''''r'e'p''''''''''''''''''''''''''''s'd'n'u'o's'''''''''''''''''''''''' 'd'r'a'h' 'y'l'l'a'e'r' 's'i' 'g'n'i't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'r'o'f' 's'c'i't'n'a'm'e's' 'e'h't''''''''''''''l'a' 'T'D'R'C' 'a' 'g'n'i't'n'e'v'n'I'n'n'.'e's'l'e' 'e'r'e'h'w'y'r'e'v'e' 'n'i' 'l'a'i'c'e'p's''''''i'r'e'h't' '' ''''''''''t'''''''''''n'o'i's's'e's'b'o' 'a' 't'a'e'r'g'were really clever (and maybe I'll just never be that smart)!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'l'b'i'r'r'e't' '''f'o' 'd''''''' 'f'n'i'k' 'd'n'a' ','n'i'a'm'o'd' 'e'n'o' 'n'i' 't'r'a'm's' 'e'r'''y'e'h'T' '.''''''''''''''''' 'd'e's's'e's'b'o' '-' 's'u' 'f'o' 't's'e'r' 'e'h't' 'e'k'i'l'''' 's'''' 'a' 't's'u'j' 'e'r'''y'e'h't''''t' 't'a'h't' 'e's'i'l'a'e'r' 'o't' 'g'n'i't'r'a't's' 'm'''I' 't'u'B' Now I know that''e'i'r'f' 'y'm'''''''''''''''''I'm kind of grateful for that silly academic paper now. I used to think th'''''''''''''''''''''''''''''''''''''''''t'''''''''''''''''' 't'a'h't' 'w'o'n'k' 'I' 'w'o'N' 'r'a'm's' 't'a'h't' 'e'b' 'r'e'v'e'n'''''''''e'b' 'r'e'v'n'e' 't's'u'j' 'l'l'''''''' 't'''''''''''''''!'''''!'.''')'h'g'u'o'n'e' 't'r'a'm's's'u'j'''''''''t'a'h't' 't'o'n' 'm'''I' 'e'b'y'a'm' 'd'n'a'(' '''at academics were really clever, but apparently being good at writing papers is a'''''''''''''''''''''''''''''''''''''''''''''' 'c'i'm'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'a' 's'i' 's'r'e'p'a'p' 'g'n'i't'i'r'w' 't'a' 'd'o'o'g' 'g'n'i'e'b' 'y'l't'''''''l'y'n'e'r'a'p'p'a''''''''''''''''''t'a'h't''''''''''''''''''''''''''''''''''''''''''''''e'h't' ''''''''''''''''''''' '-' 'e'm' 't'o'n' 'l'l'e'W'''''''''''''''''''o'n' 'm'''I'(' '' 's'a' 'e'v'i's's'e's'b'o' 'd'n'a' 'c'i'p'o'y'm' 's'a'''''''''''''''''''''.'s'u' 'f'o' 't's'e'r' 'e'h't' 'e'k'i'l' 't's'u'j' 'e'r'''y''''''''''''e'r'e'h't' 't'u'o' 's'n'r'u't' 't'i' 't'u'b' ','r'e'v'e'l'c' 'y'l'l'a'e'r' 'e'r'e'w' 's'c'i'm'e'd'a'c'a' 't'a'h't' 'k'n'i'h't' 'o't' 'd'e's'u' 'I' 'd'a'c'a' 'y'l'l'i's'''''''''''''''''''''''''''''''''''k'i'l' 't'''n'o'd' 'u'o'y' ','n'a'e'm' 'I' ''''''''''''I' '.'w'o'n' 'r'e'p'a'p' 't'a'h't' 'r'o'f' 'l'u'f'e't'a'r'g' 'f'o' 'd'n'i'k'''''''''g' 'y'l'l'a'e'r' 'm'''I'n'n'n'o'i's'u'''''''''''''''''''n'o'i't'u'i'l''''o'c'n'o'C' '#'n' ',''''o'c'e's''''e' '/' 's'n'o'i't'a'r'e'p'o' 'n'o'i'l'l'i'm' '1'1' '''''''''''''''''''''''''''''''''''''''''''''''''''''r'e'h't'o'n'a' 'd'n'i'f' 'u'o'y' 'e'r'e'h't'''''''''''''''''''e'r'e'h't''''''''''''''''''''i'p' 'a' 'd'n'i'f' 'u'o'y' '*'n'e'h't'*' 'd'n'a' 'd'n'u'o'r'a' 'h'c'r'a'e's' ','e'r'e'h't' 'o'g' 'o't' 'e'v'a'h' 'u'o'y' 'n'e'h'T' '.'e's'u'o'h' 'r'u'o'y' 'n'i' 'n'o'i't'a'c'o'l' ''''''''''''''''a'c's' 'a'h't'i'w' 'r'e'p'a'p' 'f'o' 'e'c'e'i'p' 'a' 'g'n'i'd'a'e'r' 'd'n'a' ','r'e'p'a'p' 'f'o' 'e'c'e'i'p' 'a' 'g'n'i'd'a'e'r' 'n'e'e'w't'e'b' 'e'c'n'e'r'e'f'f'i'd' 'e'h't' 's't'I'n''n''d'n'o'c'e's' '5'.'0' 's'v' 's'd'n'o'c'e's' '0'0'1' 'g'n'i'w'o'h's' 's'i'v' 'e'v'i't'c'a'r'e't'n'I' '>'n'n''l'c' ''''''''''''''''!'s'y'a'd'knew'''''w'o'n'k'' 'e's'e'h't' 't's'a'f' 'y'l'l'a'e'r' 's'i' '8'V' ''''''''V' ''''''''''''''''''''''''''''''''''''''''''''o's'l'a' 's'''' 't'I' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'h't' 'd'n'a' 's'n'o'i't'a'c'o'l'l'a' 'l'o'r't'n'o'c' 'o't' 'd'e'e'n' 'e'w' 's'l'o'o't' 'e'h't' 's'u' 's'e'v'i'g' 't'a'h't' 'd'n'a'.'*'r'e't's'a'f'*' 't's'u'j' 't'''n's'i' 't's'u'R' ''''y'c''''''''''''''''''''''''''''''''''''''' 's'm'h't'i'r'o'g'l'a' 'r'u'o' '''''s'j'y' 'g'n'i'k'a'm' 'p'e'e'k'''''''''''''''''''''''''''''''''t'o'n' '''''''''''''' 'o'g' 't'''n''''.'o'w' 't'i'''''R''''''''n'i'v'e'''''w'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'e'r'u't'c'u'r't's' 't'n'e'r'e'h'o'c' 'e'h'c'a'c' 'd'n'a''''c' 'n'o'i't'a't'n'e'm'g'a'r'f' 'y'r'o'm'e'm' 't'u'o'b'a' 'w'e'n'k' 'I' ''o'n'k' ''K'''B'''''''''.'t's'u'r' 'o't' 't'i' 't'r'o'p' 't's'u'j' 'u'o'y' 'f''''''' 'n'i' '''''''''''''''''''''''''''''!'r'e't's'a'f' 't'o'l' 'a' 't'o'n' 't'u'b' '.'.'.'r'e't's'a'f' 'e'l't't'i'l' 'a' 'e'b'y'a'M''' ''''But I knew something he didn't:''''''''''''''''''''''''''''''''''''''''''''''''''''''l'''''''''e'h't' 'y'a'w' 'o'r't'n'o'c' 'n'a'c' 'e'w' 'f'I'''''''''''''''''''' 'o't' 't's'u'r' 'e's'u' 'n'a'c' 'e'W''''U'''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'p'u'k'o'o'l' 'y'r'o'm'e'm' 'd'n'a' 'y'r'o'm'e'm' 's'e'z'i'n'a'g'r'o' 'r'e't'u'p'm'o'c' 'e'h't' 'y'a'w' 'e'h'T' ':'t'''n'd'i''''d'd' 'e'h' 'g'n'i'h't'e'm'o's''''''t'u'o'b'a' 'w'e'n'k' 'I' 't'u'B'n'n'' '''''''''''''''''''''''''t'''n''''''''''''''''e'l''''l''''e'b'i's's'o'p''''''''''''''''''''''''''''.'e'l'b'i's's'o'p'm'i' 'y'l'l'a'c'i's'a'b' 'e'b' 'o't' 'g'n'i'o'g' 's'a'w' 'r'e't's'a'f' 'n'e'v'e' 'g'n'i'o'g''''''''''''''''''' 'h'c'u'm' 't'''n's'a'w' 'e'r'e'h't'''''''''''''''''i' 'd'e't'b'u'o'd' 'e'h'''''''But I've done one last thing. I don't know if its a good idea, but I did it anyway because it sounded clever and I couldn't help myself. In this implementation, I split out the document's text content into a separate data structure. The reason is that when you're actually doing collaborative editing, you probably want all the characters in your document to be stored in an actual array, or in VS Code's editor or something. I don't think it makes sense to duplicate the document's content in my library too.nn'n'''''''''''''''''''''''''''''''''''''''''e'h' ','d'e'z'i'm'i't'p'o' 'o's' 'y'd'a'e'r'l'a' 's'a'w' 's'j'y' 'd'i'a's' 'e'H'''''''H'E' '.'e'm' 'e'v'e'i'l'e'b' 't'''n'd'i'd' 'e'h' ','s'j'y' 'n'a'h't' 'n'e'w' 't'a'h't' '' 'I'''''''''''''''''''''''''''''''''''''''''''r'e't's'a'f' 'o'g' 'd'l'u'o'w' 'n'o'i't'a't'n'e'm'e'l'p'm'i'''''''''''''''n'o'i't'a't'n'm'e'e'l'p'm'i' 't's'u'r' 'd'o'o'g' 'a'hought '''' 'e'w' 'I could'''''''''''''''''''''''''''''''''''''''''' 'd'l'u'o'c' 'I' 't'h'g'u'o'h't' 'I''''h' 't'a'h't' 'n'i'v'e'K' 'd'l'o't' 'I' 'n'e'h'W''''''' 'I''n'n'suspect we can't make javascript run much faster in this test'''''''''''''''''''''''''''''''''''e'b' 'n'a'c' 'e'w' 'e'b'y'a'm' 't's'u'j' '.'.'e'b'y'a'm' 't'u'B' '.''Can we still '' 'a'go fast''''''''''''''''''''n'a'c' '''e'w' 'o's''''''''''''''d'e'e'n' 'e'w' 'd'n'a' ','e'g'a'u'g'n'a'l' 'er? Yj''If we want to continue to improve performance, we need to go lower level. We need control over the memory layout.'n's is very well optimized alread''Y''''y, and I suspect we ca'''''''s'i' 's'i'h'T'n't make javascript run much faster in this test.'' If we want to continue to improve performance, we need''''''''''''''''''''''''''''d'e'e'n' 'e'W' '''''''W' '.'l'e'v'e'l' 'r'e'w'o'l' 'o'g' 'o't' more control over the memory layou'.'''t 'F'- which we can do in' ''' ''a systems language like Rust.''Can we still go faster?''C''''''c''' 't'u'B''C'''''''''''''''''''''?'r'e't's'a'f'''''''' 'o'g' 'l'l'i't's' 'e'w'''n'n''' '''''''''''''''''''''''s'd'a'e'r' 'y'r'o'm'e'm' 'n'i'a'm' 'e'r'a' 'n'a'c' '''''''''' '?'w'o'l's' 'w'o'H''t'u'B'n''n'''''''''''W''''''''''''d'l'u'''o'w' ''''''''''''''''''t'''''''n'a'm'u'h' 'u'o'b'a' '-' ''''''''''''''''''''''y'r'e'v'e'' 'r'e't'u'p'''''l'l'i''''l'w' ''m'o'''''''' 't's'o'm''''''''''''''''''''''''' 'f'o' 'd'a'e't's'n'i' 'e'n'i'g'a'm'I' '!'''''''''''''''''''''''''''''''''d''o 'o'''th''e ''do''''''''''''''''''.''''''''''''''''''''''''''''''''''''''''''''''''' Arranging'''''' 'n'I' '.'t'p'i'r'c's'a'v'a'j' 's'n'u'r' 't'i' 'n'e'h'w' 'r'e't'u'p'm'o'c' 'e'h't' 'o't'''''''o'd'''''''' 'e'h''''o't' 'o'd' 'o'd' 'e'w' 't'''a'h'w' 's'i' 's'i'h'T''''l'a'c''''''''''p'm'o' 'e'h'T' '.'''''''r'e't's'a'f' '''o'g' 'n'a'c' 'e'w' 't'u'B'''''''e'W'''''''e'w' 't'u'B'n'a'n'''e'u'q'e's' '''e'r'''''''''''f''' 't'i' 'g'n'i'k'a'M'''''''''''''''''''''''t''Yjs is very well optimized already,'''''''''''''''''''''''''''e'n''k''n'a'm' 't''''n'u'r' ''''n'''''''''''''t''n## Making it faster than Javascript' '''n''''''n'n'''''I's'e't' 's'i'h't' 'n'i'a'c' 'e'w' '''j''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t's'u'R' 'e'k'i'l' 'e'g'a'u'g'n'a'l'''''''' 's'm'e't's'y'''''''t's's''''''r'e'w'o'l' 'a' 'n'i' 'o'd' 'y'l'n'o' 'n'a'c' 'e'w' 'h'c'i'h'w' '-' 't'u'o'y'a'l' 'y'r'o'm'e'm' 'e'h't' 'r''''''''''y'r'o'm'e'm' ''''''''''''' 'y'''','y'a'w' 'e'h't' 'y'B'''''''''''''''''''''''a''' 'e's'u'a'c'''''''''''''''''''' 'l'l'a' 's't'I' '.''''''''''''''''''''''''''''''s'i'h't' 'e'k'i'l' 'a't'a'd' 'e'g'n'a'''''''''''' 'e'n'o' 'y'b' 'e'n'o''''''''''''''m'e't'i' 'h'c'a'e' 'r'o'f' ''''''''''' 'a't'a'd' 'a'r't'x'e'''r'''r'a''''''''''''''''''''s't'c'e'j'''' 'l'l'b'o' 'e's'o'h't''''''''d'i''''n'a' ',''''''I' '.''' 'f'o' 'l'l'a''''''''''y'r'o'm'e'm' 'n'i' ''' '''' '-' 'd'e't'n'e'm'''g'''''''''l''''''''e'w' 'f'I'l'e'w' 's'a' 'a'r'f''e'b''' 'e'l'b'i'r'r'e't' 's't'I''''''''''''' 's't'''','''''I'n'i' ''e'v'o' '''''''t'u'o'b'a' 'l'' '-'''''''-' ''''o''''''''''''''''''' ','n'o's'i''''''''''''s'n'o'r'a''''s'p'm'o'c' 'n'I'''''''''''''''''''n'n'''''''' ','d'e'e'p's' 's'i'h't''''''''''''''''''''''''''g'n'i't'i'.'B''''''''''''''''''r'e't'u'p'm'o'c' 'e'h't' 's'e'k'a't' '''''''''''' 'g'n'i'p'p'o'h's' '' 't'''a' ''''''''''''''''''''''''''''''''''''s'e'm'a'n' 't'n'u'h' ''''''''''''''''''n'e'''''''e'n'd'd'i'h' 'a' 'h''''''''''''' 'r'e''''''''''''''''''''r''' ','y'a's' 'o't' '''''''''''''''''''''r'e''''''''''''''''''''.')'e'm'i't' 'r'e't'u'p'm'o'c' 'n'i'(' ''''''''''(' 't'u'p'm''''''''''o't' 't'n'a'w' 'I'o'c' 'e'h''.'A''''''t''' 's'e'k'a't' ''s's'e'l'd'e'e'N' '.'''' '''''''''nnReading the whole list would take ages.'''''' '''v'e't'a'h' (With linked lists'''''''''''''''''''''''d'a'e'r' '''''u'o'y' 'y'r'o'm'e'm' 'a' 'r'u'c'n'i' 'u'o'y' we do that scavenger hunt each time we move between items!)''''w' 'r'o't'i'w' ','''r'''''e'''g'n'e'v''''''''''''''''''''''''''s't'c'e'j'b'o' 'a'r't'x'e'''''''''''''''''''''''''n'e't'f'o' 's'i' 't'''''''''''' 's'i' 's'i'h'T''l'u's'e'r' 'e'h't' '''o's' 'e's'o'h't' 'l'l'A'a'c's' 'e'h''''''''''''''''''' 's't''''''''''''''''y'l''''''''''''''''''''''''''''''''''','o'g' '*'y'l'l'a'e'r'*' 'n'a'c' 'e'':'w' ':''t'''s'a'f''' 'w'o'h' 'e'e's' 'o'T''b'm'e's's'A'b'e'W't'a'h't' ''s'i'l' 'd'e'k'n'i'l' ''3'h'''''''2''''''''''''''''''''''','b''''''s'j'y' 's'a' 'e'm'a's' 'e'h't' 's'k'r'''''''''''y'l'l'a'n'r'e't'n'i' ''o'w''''''''''''''''''''''''''''''''''''''''''''' 's'u'o'i'v'e'r'p' 'e'''''''''''''n'e'm'e'l'p'm'i' ''h't'''''''''t'o'l' 'a' 't'F''a'h't' 'o'd' 'e'w' 'd'n'a' ','s''''''''''''''''''''d'r'i'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'e't's'a'f' 't'o'n' ','r'e''''''' ','w'o'' '''l'''s' 's'g'n'i'''''''' 'n'e'v'''''''''''''''''''''''''''''''''''''.'m'e't'i' 'y'n'a'''''''''''''''e'r'''''''''''s'e'''t'a'd'p'U''''''''''n'i'a'g'a' ''''''''''''''''e'n'o'd' 'e'r'''e'w' 'd'n'a' 'o's'' '.''o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(' 'D'I' 'r'i'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.''''''''''''''g'n'i's'u' 't'o'n' 'm'''I'o'o't' ','t's'a'''''''''''''''''''t'''''''''''''''''''''' '''?'p'l'e'h' 'd'l'u'o'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'l't'h'g'i't' 'n'i' 'g'n'i'h't'y''''''''' 'f'o' 'n''''''''''''''''''''''M'A'R' 'n'i' 't'n'e'c'a'j'd'a'''''''d'e'k'c'a'p' 'l'l'a' ','''' '''u'r' 'a''r'e'v'e' 'k''''''''''''''''s'y'a'w'l'a' 's'i' 'y'p'c'm'e'M''''''' 's't'i'''''''''''''''''''''' 'e'h't'''''''''''''''''''''''''''''p'u'k'o'o'l' 'y'r'o'm'e'm' 'n'i'a'm' 'a' 'f''''''''''''''''''''''''''o't' 'e'd'o''''''''''''''''''''''''''''''t'p'i'r'c's'a'v'a'j' 'm'o'r'f' 't'i' 'e'v'i'r'd' 'd'n'a' ''''''''''''''''''''''''''''''''''''''''''''''''t'i' 'l'l'a'c' 'd'n'a' 'e'd'o'c' 'e'v'i't'a'n' 'o't' 't'i''*' 'e'l':''i'p'm'o':'''''.'''':'''*''''c' 'e'w' 'f'i' 'd'n'A'c' 's'i'h't' 'e'l'i'p'm'o'c' 'e'w' 'f'I''''''''''''' 'm'o'r'f' ''o't''n'e'v'i'r'D'''3'o' ''''''''''2''''''''''''''''''''''''.'t'n'u'h' ''''''''''''''''''''''''''''''''''''''''n'i' 'e'c'a'r't' 'e'l'o'h'w' 'e'h't' 's'''' 's'e'c'o'r'p' 'w'o'n' 'n'a'c' 'e'w'r'e'g'n'e'v'a'c's' 'a' 't'o'N' '.'s't'a'e'b' 't''''b'r'a'e'h' 'w'e'f' 'a' 's't'i' '-' '''''c'a'p' 'n'a'c' 'e'w' 'o's' ','t'u'o'y''''t'a'l' 'y'r'o'm'e'm' 'e'h't' 'r'e'v'o' 'l'o'r't'n'o'c' 'l'a't'o't' 's'u'''''''''''''h'g'u'o'r'h't''t'''''''''''''x'3' '''''''''''' ','''''''''''e'v'i't''''i'a'n' ''' '''''' '''t'u'B'n'y'l'b'm'e's's'a'b'e'w' 'm'o'r'f' 'n'e'v'E''''''''''''''''''''''''''''''''''''''''''''d'e'd'n'u'o's' '''''''''l'a'm'r'o'n' 'g'n'i't'i'd'e''''''''''''''''''''t'u''''''''''''s'''t'n'e'm'u'''c'o'd' 'o' 't'i'l'p's'''''''''''''''''''''.'g'n'i'r't's' 't'p'i'r'c's'a'v'a'j' 'w'a'r' 'a' 'g'n'i's'u' 'n'a'h't' 'r'e't's'a'f' 's'i' 'e'd'o'c' 's'i'h'T''''''''''i'h'T'n''n'' 's'e'v'i'g' '' lets us ''''-'-'-'n''n'p'''''''''''' 'e'n'o'd' '''e'v'''I'ack all the items tightly in memory''''''''''''' 's'd'i'o'v''n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''h'm''''t'i'w' ',''''''M' ''''''''''''g'n'i'''''m''' 'o'S''''''.'h'c'a'o'r'p'p'a' '''s't'c'u'r't's' 'f'o' 'y'a'r'r'a''' 'n'a'h't' 'r'e'h't'a'r' '''s'y'a'r'r'a' 'f'o' 't'c'u'r't's''' 'a' 's't'I' '''' ''''''''''''''''''''''''''''f''''''''''''''''''''''''' ','n'o'i't'''''t'x'e't' ''a't'n'e'm'e'l'p'''m'i' 's'i'h't' 'n''''''''''''''''''''t'w''''a'h't' 's'i' 'n'o's'a'e'r''''''' '''''l''' 'o'S'm'''I' 'e'h'T' 'I'l'e's'y'm' 'p'l'e'h' 't'''n'd'l'u'o'c' 'I' 'd'n'a' ''a' '''' 't'i' 'e'''''''''''''''''''w' 't'i'e' 'b'y'a'M'e'''''' 't's'u'j'y' '''''''''''''''''''''''''''''''''''''|' '' ''''''''''''''''''''''''''''e'| -------------------------- '---------''''''|'-'-'-'-'-'''-'' | --------''' | ---------- | --------- '''''' ''''''''''''''|' ' ' ' ' 'e'e'r't'-'e'v'i'a'N''''T'''| ------''''''''''''''''''''''''''''|' ' ' ' ' ' ' ' ' ' 'y'a'r'r'A'''-'-'-'-'-'-'-'-' '|' ''''-'-'-''''''''''''''''|' '*'' ' ' 't's''''''*'i'l' 'd'e'k'n'i'L'''--''r'u't'c'u'r't's' 'a't'a'D''*''''''''''''*'''''''''''|'| Rust (Called from JS via WASM) | 0.20s | '''''''''''''''''|'| Rust (native) | 0.065s | 2.3 MB | B-Tre' |'e'' ' ' ' ' ' ' ' ' 'e'e'r'T'-'B' '??? |'' ' ' ' ' ' ' ' ' ')'' |'e'n' ''o'n'(''' '|' ''''''e'e'r'T'-'B''e'g''''n'n''n'n'n''a'u'g''''S'J'''''''''''''t'p'i'r'c's'a'v'a'J' '''''''e'e'r'T'-'B'n'a''''''''''g'n'A'''''''''''''|' ' ' ' '''S'J' '' ' ' ' ''''''''' '-'-'-'-'-'-'-'-'-' 'L' '|' 's'c'i't'n'a'm'e'''''''''''S'J' '|' ' ' ' ' ' ' ''S' 't'i's'' 'k'n'i''''|' ''''A'G'R'''''''M'A' 'h't' 't'''n'o'd' ''''.'t'i' ''t'o'n' 't's'a'e'''''''''''A'T'A'Y' '/' 'A'G'R' ''''''''''A'G'R''l' 't'''y'M'''a'''''m'''''''''A'T'A'Y' ''''''''''''''''' 't'i' 'e'k'a'm'''''o'o't''<'''''''''''''''')'e'n'o'n'(' ''''''''''n'a'p''''''n'''a''','>'''p's' 's' '''''''''''A'T'A'Y' ''','''''''''']'.'.'.' ','''m'e't'i' 'm'e't'i' ','m'e''''''A'T'A'Y' 't'i'[''''{' 'f'o' '''e'e'r't'B'''''''i'[''' ' 't'h'g''''''A'T'A'Y' 'i'm' 'h'c'i'h'w' '-' ''f' 's'i'h't' 'e'k'a'm' 'o't' 'x'e'd'n'i' 'n'a' 's'a'h' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 't's'u'r' 'y'M' ''h't' 'y'b' 's'm'e't'i' 'd'n'i'f' 'o't' 'd'e'e'n' 'o's'l'a' 'e'w' 's't'i'd'e' 'e't'o'm'e'r' 'g'n'i'g'r'e'm'''''''''''''''''''''''''''''''''.'T'D'R'C' 'a' 't'n'e'm'e'l'p'm'i' 'u'o'y' 'w'o'h' 's't'a'h'T' '.'''' 'n'e'h'w' 't'u'b' ','e'r'e'h' 'y'a'l'p' 'o't'n'i' 'e'''''''e'p'm'o'c' 't'''n's'e'o'd' 't'I''''''''e'w' 'n'e'h'W'n''n'm' 'y'n'a' 't'p'i'r'c's'a'v'a'j' 'e's'u' 'o't' 'e'v'a'h' 't'''n'o'd' 'e'w' 'e'h't' 'e'k'a'm' 'n'a'c''''''s'e'k'a'm' 'h'c'i'h'w' ',''' '''''''''' 'a' 's't'I' '.'''''''''''''''''''''''''''''''''' 'e'h't' 'g'n'i'k'a'm' 'e'r'''e'w' 's'a' 'n'e'v'e' ','e's'r'o'w' 'n'o'''i't'a't'n'e'm'g'a'r'f' 's'e'k'a'm' 't'a'h't' 'd'n'A''''''''''''''' 't'p'i'r'c's'a'v'a'j' 'n'I''''''e's'e'h'T' '.''')'s'y'a'r''''a'r'a' 'e'z'i's' 'd'e'x'i'f' 'e'k'i'l'(' ''''''''''''''''''''''p'u' 'd'n'e' '''''''''n'e'l'l'i'w' 'h'c'i'h'w' ','''w' '''''''''''''''''''''''s'''e'r'e'h't' 'o'S' '.''''''''''e'w' 'o's' '''''' ','s't'c'e'j'b'o' 'f'o' 't'o'l' 'a' 'd'e'e'n' ''m'e't'i' 'n'e'e'w't'e'b''t'i'W''''F't' '''n'i' ''''''''''i'l' 'd'e'k'n'i'l'm'e't'i' 'd'n''''''''''t' 't'A''r't'n'o'c' 'e'r'o'm'''' 't'c''''''t'''n'a'c'e'p''''''''''''''''''''''''o'd' 'y'l'n'o' 'n'a'c' 'e'w' 'h'c'i'h'w' '-''''w' '''s'u's'''''b'u'o'd' 'I' 'd'n'a' '''p'i'r'c's'a'v'a'J' 'n'a'h't' 'r'e't's'a'F'''''''''''''t'p'i'r'c's'a'v'a'J''Ev'''''d'i''''n'a' ','''erything is faster in Rust, with B-Trees''''s't'I''Everything is faster in Rust, with B-Trees''''''''''' 'g'n'i'v'a'e'L''a' 's't'n'''''''a' 'e'''''''''''''''''''''''''''''' ','e'c'a'r't' 'g'n'i't'i'd'e' 's'''n'i't'r'a'M' 'n'i''''''''''''''''''''''''' ','e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't' 'r'o'f''' 't'''r'''a'p' 'd'n'a' 's'D'I''''''''''s'e'i'r't'n'e'''''D'i' 'e'h't''s'm'e't'i' 'f'''o' 's'n'u'r' 'e's'p'a'l'l'o'c' 'y'l'n'o' 'n'a'c' 'e'W'''''l'l'o'C' '.'' 'e'w' 'e'm'i't' 'y'r'e'v'E' 'e'r'e'h' '''Well, '''''n'i' ''''''w''' 't'u'B''''''''''t'u'g''''u''''''there'''''''th'''''''h't' 'n'i'e't'i' 'f'o' 's'd'n'a's'u'o'h't' 'g'n'i'v'o'm' 'e'r'''e'w' 'n'e'h'w' 'w'o'l's' 'y'l'b'a'b'o'r'p' 'l'l'i't's' 's't'i''r'e't'f'a'''''''' ','l'l'e'W''''''8'V'''''''8'v' ''''' 'm''''''.'W''''e'r'e'h'''I'(' ''''''''''''''''T' '>'n'n''''''*''' 'ing immutablejs. ' ''''''''''''''s't'n'e'm'm'o'c'''''''o' 's't'o'l' 'h't'i'w' ',''' '''''o't''''s' ','''''''''''''''''''''''''''''''''''' 's'i'h't'''''''''''''t'''n'e'r'a' 's'''''''''''''''''''''''''g'n'i'h't' 'e'n'o' 't's'u'j' 'r'e''''''''''j' 'r'v'e'n' 's'i' 'e'c'n'e'r'e'f'f'i'd' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h'T' '.'''''''''''''''s't'i' 'o's' ','m'h't'i'r'o'g'l'a' 'e'h't''''a' 's'''e'r'e'H'' 't'I'l'a'i't'n'e's's'E'''''''''''''''a' 't's'u'j' '''s'i' 's'i'h'T't'i' '''''''''i''' ','''''''''''''''''''''''''.'s'i'h't' 'e'k'i'l' 's'T'D'R'C'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'l'p'''s''i't'l'u'm' 'f'o' 's'c'i't'n'a'm'e's' 'e'h't' 't'n'e'm'e'l'p'm'i' 'u'o'y' 's't'e'l' 'y'a'w' 's'i'h't' 't'i' 'g'n'i'o'D' '.'2'n'''''M' '.''''u'o'y''''''''o't' '''''d'''''e'e'n' '' ''s'''''''''''''s''3'''''''''''''''''''''''''''''''''''''''''''''e'c''''r'a' 'e'r'e'h't' 'n'e'h'w' 'n'w'o'''''''''''''s't'a'h't' 't'u'B''''''-' 'u' '.''d' 's'w'o'l's' 'y'l'n'o''''''''''''''t's'a'f' 'r''I'''e'p'u's' ''''s's'i' 'm'.''''h't'i'r'o'g'''e'''*''h't''l'a' ''''''''*'e'h'T' ''''''y' '''s'i' ''d'n'a' ','k'r'o'w''''''''''''''''''''''''''''''''''''''''9'''[''F'''(''''''''''https://github.com/josephg/reference-crdts/blob/main/reference_test.t''')'s'('''''''''''''y'''''''t'''''i''' 'e'W'n'a'g'e'l'e''l'l'a'e'r'' Genius!'''' Genius!'''.'''' 'o'''s'l'a'''''''''''''t'u'o'b'a' 's't'''''''''''''a' 's'T'I''d'n'i'k' ':'''']'''''''')'M'T'(' 'd'e'i'f'i'''''''i'f'r'e'v' ''''c'n'y's' 'd'n'a' 's'j'y''')'.''' '''d'n'a' ','e'g'r'e'm'o't'u'a' 'l'a'u't'c'a' 'o't' ' 'l'l'a' 's''''R' 'f'o' 's't'o'l' ''h'u' 'd'n'A' ','''e question is'''''T'D'R'C' ', how do you insert a'' new item into a list like this' ?'.''''.''''''''''''''''the'''i'''''''''''''''''''s''' ','u'o'y' 'd'n'i'M'''''''''''''' ''answer is'''y'b' 't'r'e's'n''4'''i' 'e''''i'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'e't's'e't' 'g'n'i'e'b' 's'e's'a'b'e'd'o'c' 't'n'e'r'e'f'f'i'd' 'y'l'e't'e'l'p'm'o'c' 'e'r'a' 'e's'e'h'T''''''' 'e's'e'h'T'''''' 's'i'h'T' '''''''' '.'y'l't'h'g'i'l's' ''''.'s'e'g'n'a'h'c' 's'm'e't'i' 't'r'e's'n'i' 'e'w' 'y'a'w' 'e'h't''You can't tell from looking at this method, but insertionsAfter' ','e'r'u''5'''t'c'u'r't's' 's'i'h't' 'h't'i'W''''''''''e'r'e'h't' 't'e'g' 'l'l'''''''''u'b' ','''e'''''m' 'n'e'e'b' 't'''n's'a'h' 't'i' 't'u'b' ','m'h't'i'r'o'g'l'a' 'e'h't' 'r'o'f' '''''''''d'n'e'k'c'a'b''' 't's'u'r' 'a' 'n'o' 'g'n'i'k'r'o'w' 's'i' 'm'a'e't' 'e'g'r'e'm'o't'u'a' 'e'h'T' ''''''''''''''''''''''''''''''''''''''!'s'r'e'l'i'o'p'S' '.'e't'a'i'r'p'o'r'p'p'a' 's't'a'h't' 'n'e'h'w' '2'5'.'1' 'c't's'u'r' 'd'n'a'ejs 16.1 ' 'h't'i'w' ',''''''''''''''''''''''''''''''''''.'n'o'i't'a't's'k'r'o'w' 'x'0'0'8'5' 'n'e'z'y'r' 'k'n'o'h'c' 'y'k'n'o'h'c'''''''c'h' 'y'm' 'n'o' '1'.'6'1' 's'j''''s'e'd'o'N' 'g'n'i's'u' 'e'n'o'd' 'e'r'a' 'e'r'e'h' 's'k'r'a'm'h'c'n'e'b' 'e'h't' 'l'l'A' '.')'s'(']'e'r'e'h' '''e't'i'u's' 'g'n'i'k'r'a'm'h'c'n'e'b' 'e'v'i's'n'e't'x'e' 'e'r'o'm'''''''r'e't't'e'b' 'h'c'u'm' 'a' 's'a'h' ')'r'o'h't'u'a' 's'j'Y' 'e'h't'(' 's'n'h'a'J' 'n'i'v'e'K' ' '''''''n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'm'e't'i' 'f'o' 'e'e'r't' 'a' 'g'n'i'd'l'i'u'b' 'y'b' 's'k'r'o'w'''''''''''s't'n'e'm'e'l'p'm'i' 'y'r'a'r'b'i'l' 'e'g'r'e'm'o't'u'a' 'e'h'T' '.'r'e'v'e't'a'''''''a't'h'W''''''''''''''''''''''''''''''''''''''''s't'n'e'm'e'l'p'm'i' 'y'r'a'r'b'i'l' 'e'g'r'e'm'o't'u'a' 'e'h't' ','s'e'Y''''''''k'n'i'h't' 'I' '''j'''Y'('n''n'''''''''''''''''''''''''''''''''''''''''' 's't'i' 't'u'b' ','h'c'a'o'r'p'p'a' 't'n'e'r'e'f'f'i'd' 'a' 's'a'h' 's'j'Y' '.'''' ','e'g'n'a'h'c' 'a' 'e'k'a'm' 'u'o'y' 'n'e'h'W''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'e'e's' 'r'e'v'e' 'e'v'''u'o'y' 'r'e'b'm'u'n' 'e'c'n'e'u'q'e's' 't's'e'g'g'i'b' 'e'h't' 'n'a'h't' 'r'e'g'g'i'b' '1'''i'b' 's'i' 'r'e'b'm'u'n' 'e'c'n'e'u'q'e's' 'e'h'T' '.'t' 'g'n'i't'r'o's' ''o'g' 'e'n'o' 'h'c'i'h'w' ','n'o' 'g'n'a'H' 'js''''''''''''y'l'l'a'u't'c'a' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ','y'a'd'o't' 'n'o'i't'a't'n'e'm'e'l''''''' ','h'g''''''''''y'l'l'a'u't'c'a' 'r'a'p'm'i' ''''''''' 'e's'u'a'c'e'b' ''''T'D'R'C' 'e'd'a'r'g' 'n'o'i't'c'u'd'o'r'p' 'a' 't'n'a'w' 'u'o'y' 'f'I' '.'t'i' 'g'n'i's'u' 'd'n'e'm''''''''''d'n'e'm'o'c'e'r' 't'''n'o'd' 'I''''I'n'n'language I w'['ant to progra'''https://martin.kleppmann.com/2020/07/06/crdt-hard-parts-hydra.htm')'l'(']'m something I already understand, in order to get a sense of things.'''''''''''''p'u' 'd'e'''g'n'i''''''d'n'e' '''''' '''''''''''','''''''o't'''n',''''''''''''''t'''''''''''''''''''''t't''''u'b' '-' 'm'h'''t'''''''''''e's'o'l'c' 'n'e'v'e' ''i'r'o'g'l'a'''''''''''''''''''''''''''''0'0'0' ''''k''''''''i'r'g'l'a' ''''''''''''''''''''''''''''''''''''''' ','s'k'' function in''''''s'n''''''''''''s'n'o'i't'a'r'e't'i''''''''''''s'n'o'''!''i't'a'r'e't'n'i' 'u'r'''''s'e'o'd'''''''''''i' 's''''''''''e'e'r't' 'a' 's't'I''''''''''''''''''''''''''!'g'w'a'd' ','e'e'r't' 'a' 'e'k'i'l' 's'd'n'u'o'S''n'u'''''''u'r''''''''''''e'd'o'c' 'c'i''''''''''c''''''y'z'a'r'c'i'a'r't' 'n'o'i't'a't'''''''''''s'a'w' 'e'r'e'h't' 'n'e'm'e'''''''m'e'l'p'm'''''''''''''s'i' 's'i'h't' 't'u'B''''''a' 'h''''''''''''''''n'e'r'e'h' 'm'a'r'g'a'i'D' '>'n''a'H'''''''''''''''''''-' '''''d'r'!''''a'w'k'w'a''''w' 'a'h'a'H''''''''''''''''''n'e'e'b' 'e'v'''!'s'p'o'O' '''i' '''''''''''''''''''''''''s'm'h't'i'r'o'''''''''''' 't'n'a'e'm' 't'a'h't'g'l'a' ''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''''''g'n'i'n'n'u'R''g'n'o'r'w' 'r'e'p'u'S' ''''''''''''''''''''''.'t'n'e'i'c'i'f'f'e'''''''''''' 'y'l'l'a'u't'c'''''''''''''''''''''1'9'2''''''''''''''''''''''''''''''''''''''''https://martin.kleppmann.com/'')'(']'r'e'h'c'r'a'e's'e'r'''''r'e'v'o' '' 'r'a'l'u'p'o'p' 'a''7''''6'2'''''''6''''5'''2''''[' 'y'b' 'n'e't't'i'r'w' ','''''''''''*''''''*'o's'l'a' ''''''''''''''a''''''''''''''''''' '''''''''''''''''''Y'(' ''''n'e'h'W''x'0'0'0'0'1' '-' 'n'a'c'''''''.'''e'd'o'c' 'e'''''' '''''u'''''''' 'r'i'e'h''''''''''g'n'i''''''''''''''''''''''''''''''''''' '''y'b' 'e'd'a'm' 'e'b' 'n'a'c' ')'t'n'e'm'u'c'o'd' 't'x'e't''''d' 'r'o'(' ''t'l'u's'e'r' ''t''o'y' 'w'o'h''''c''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'e'r't' 'a' 's'a' 'a't'a'd' 'e'h't' 'l'l'a''''''' '''''a''''' '''''e'''''r'o't's' 'o't' 's'i' 'h'c'i'h'w' ',''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''w''' 'd'n'A''''''''''''''''''''''''''''''''''''''''''''''.''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''''''''''s'a''''''''''''''''''''''''''''''''''e's'u' 'o't' 'g'n'i'o'g' '''k'r'a'm'h'c'n'e'b' 'e'l'p'm'i's' 'a' 'r'o'f''''t' 'o'S'''''o'T' '''''''''''''''m'e'h't''' 'f'''''''''f'l'e's'm''''''''''e'r'e'h'w' ''i'h' 'o' 'l'l'a''''''''''''''y'n'a' 't'''n'e'r'a' ''' '''''.''''''''''''''''''''''m'o'r'f' 's't'i'.'B'''''''d'e' 's'a'h'''''-'u'''''''''''''''''''''''''y'l'l'a'u't'c'a' ''''''''''''''''''''''''''''''''''''e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'o'd' 'l'l'''t'''''''t'i'''''''''' 's't'i''''.'h'e''''''''''''h'g'u'o'n'e' 'd'o'o'g''''''''''''''''''''''''''''''''u'o' ','f'f'u't's' 'd'o'o'g' 'e'h't' 't'n'a'w' 'u'o'Y' '.'h'e' 't'u'b' ','l'a'e'd'i' 't'o'N' '.'*'y'l'l'a'c'o'l'*' 'e'c'a'r't' 's'i'h't' 'g'n'i'y'l'p'p'a' 'm'o'r'f' 'e'm'i't' 'e'h't' 'g'n'i't'n'u'o'c' 't's'u'j' 'm'''I' 'd'n'A' ''''''''''''''''''''.''''''''''''''' 't'r'''''''''''''''''''.'e'm'i't' 'e'm'a's' 'e'h't' 't'a' '''a't's' 'd'n'a' 'e'c'a'l'p' 'e'm'a's' 'e'h't' 'y'l't'c'a'x'e' 't'''''''t' 'a' 's'r'o's'r'u'c' 'r'i'e'h't' 't'u'p''' 'r'e'v'e'n' 't's'o'm'l'a' '' '''''''a'j' ''''''''p'p'a' 'c'i'''''''''e'r'e'h' 's'm'h't'i''''h'r'o'''''''i'r'g'l'a' 't'n'e'r'e'f'f'i'd' 'f'o' 't'o'l' 'a' 'h'g'u'o'r'h't' 'o'g' 'o't' 'g'n'i'o'g' 'e'r'''e'W''''''''''''''''o'p' 's'i'h't' 'h'g'u'o'r'h'T'n''''''''''''''')'?'e'c'a'l'p' 'e'h't' 'r'e'v''''''''''t' 'f'o' 'l'l'a' 'g'n'i'o'd' 's'y'a'r'r'A'8't'n'i'U' 'e's'o'h't' 'l'l'a' 'e'r'a' 't'a'h'W'(' ''''''''''''h'W'(' '''''''''''''''''''''''''''''''''''''''''''''''''''''y'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's't'I'''''''''''''''''''''' 'd''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'e't'c'a'r'a'h'c''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''- Insert 'a' id `(seph, 0)` after `ROOT`'- Insert 'b' id `(seph, 1)` after `(seph, 0)`n'n''''''''c''''''b''''''2'''''''''''1'''`'1''''''''''''''''''''''''''''!'e'e'r't' 'a' 's'a'''''''' 'a' 'e'k'i'l' 't'a'h't''''t' 'w'a'r'd' 'n'a'c' 'e'W''How should you represent that? A tree of course!nn> Diagram her''en'n''n''''''e'k'i'M's'' ''''''''''''''''X'''''''''''''e'w'''''''''''' ''''''*'*''''''b'''''''''''''''''''''''''''''''''''- Insert 'a' id `(se'''''''0' ','e'k'i'm'ph, 0)` after `R'X'''OOT`n''''n- In'x'''sert 'a' '3'''id `(s''''''''0' ','h'p'e's'('eph,')' 0)` afte'Note the 'x' and 'b' both share the same parent. This will sometimes happen when users concurrently type in the same location, and we can resolve that by comparing their item IDs. But we don't want to do that in this case! In this case no matter what the IDs are we should always end up with 'aXbc'. RGA solves this by adding '''''''''''''''''r'e'g'e't'n'''''''''''''''''''''''''''':''''''''''I' '.'''':'n- Insert 'a' id `(seph, 0)` after `ROOT''''''''*'''*'0' ':'q'e's' ','`n- Insert 'X' id `(mike, ', seq: '3'''*0*'0)` after `(seph, 0)`n- Insert 'b' id `(seph', seq: '1'''*0*', 1)` after `(seph, 0)`n''-'''''''''''''')'A'G'R'(' ''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i't'c'e'n'n'o'c' ''''','''''''''' 'y'b' ''''''''''e'l'p'So how should you *implement* automerge? The automerge library does it in the obvious tree based way. At least I think so '''''''''''''''''''''c'b'a''' ''''''g'n'i'p'y't' 'r'e't'f'a' '''[''''''''''''''''''''*'f'o' ''''*'''''''o' 'e'm'o's'*'''''''s's' '''''''''''''''''''''''''''''''''https://gist.github.com/josephg/0522c4aec5021cc1dddb60e778828db')'e'(']'''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'e'r'e'h' 'n'o' 'g'n'i'o'g' 's't'a'h'w' 'a'e'd'i' 'o'n' 'e'v'a'h' 'I' ','h'a'e'Y'''''''!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Holy cow! ~~Thats nearly as much ''as slack.~~' '''n'n'.'M'A'R' 'f'o' ''''''' '.'B'M'0'8'8' ','p'e'y' '-' 't'a'h't' 's'i' 'w'o'w' 'd'n'A' '''''''''''''''''''''''''''''''''''''''''''''''''''''!'t's'a'f' 'y't't'e'r'p' 's'i' '8'V'''''''''''t'p'i'r'c's'a'v'a'J' '.''''''''''''''''''''n'n'''.'y'a'w'y'n'a' 'e'r'a'r' 'r'e'p'u's' 's'i' 'n'o'i't'a'c'o'l' 'e'm'a's' 'e'h't' 'n'i' 'g'n'i'p'y't' 'y'l't'n'e'r'r'u'c'n'o'c'''''''' 'g'n'i'''''''''''''|' 'e'| -------------------------- | ---------- | ----''|' '-----''g'a's'u'''''d'e's'u' 'M'A'R' 'p'y''880M''''''|'| JS baseline '' '' '' '' '' '' '' | 0.61s | 0.1 MB |'' ' ' ' ' 'B' ''t' 's'r'''''''''''' '-'-'-'''''''''''''|' ' ' ' ' ' ' ' ' ' ' '-'-'-'-'-'-' 'e's'U' '''''''''''.'''''''''''''''''''''''''''''' 'y'a'w'''''''''''':'t'i' 'o''''''''''''''''''' ' ' ' ' ' ' ' ' ' ' ' ' ' '''''''''''''''''''-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-''''''''''''''w'e'l's' 'e''1'''''l'o'h'w' '-'-'-'''' '' ' ' ' ''''''' ' ' ''' ' ' ' ''t'n'i' 'e'c' ''''''''2''''''''''' ' 'n'''''''''''''''''''''''''''''''There's an old saying with performance tuning:nn> You can't make a program faster. You can only make it do less work.nn''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'k'r'o'w' 's's'e'''l' 'o'd' 't'i' 'e'k'a'm' 'y'l'n''n1. Automerge makes heavy use of immutable.js. Immutablejs is a library which gives you clojure-like copy-on-write semantics for javascri''p''t objects. This is a cool set of functionality, but the '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''B'K''''''''''''''''''t'n'e'm''''''B'M'0'8''''~'~'''''''`'`''Thats nearly as'~~'''''-'-'''''''~'~' much as slack.''~'''''''''''''''''''''''''''''''.'k'c'a'l's' 's'a' 'h'c'u'm' 's'a' 'y'l'r'a'e'n'''''''' 'y'l'a'r'e'n' 's't'a'h'T' '''''''''''''''''''''''''''''''''''!'g'i'b' 'y'r'e'v' 'n'e'v'e' 't'''n's'i' 't'n'e'm'u'c'o'd' 'e'h'T' '''''''''''''''''''''''''''''''' 's'a' 'm'a'r' 'h'c'u'm' 's'a' 'y'l'r'a'e'n' 's't'a'h'T' '8'''u'''''c'o'd' 'b'k''''''''''!'w'o'c' 'y'l'o'H' '''''h'''''''b'l'0'0'1' 'a' 'e'c'u'd'o'r'p' 'o't' ''''''''''''''''''''''''''''''''''''''''!'!'''' 'm'a'So how do we make the computer do less work here? There's lots of performance wins to be had, but with this sort of thing its always best to start with macro optimizations. There's no point optimizing code you might be about to delete.'n'''r' 'f'o' 'B'G'7''''6'.'1' 's'e'm'u's'n'o'c' 'e'g'r'e'm'o't'u'a' 'n'i' 'e'c'a'r't' '''''''''''' 'I' 'd'n'A' 'g'n'i't'i'd'e''''a'r't' 'e'l'p'm'i's' 's'i'h't' 'g'n'i'n'n'u'r''''''''''''''''''''''''''''T''''''''' 's'e'k'a''.'''''''''','l'l'a' 'r'e't'f'A''''m''''n''n'o'c' 'e'c'a'r't' 'g'n'i't'''''''e't'e'l'e'd'i'd'e' 'e'l'p'm'i's' 't'a'h''''h't' '-' 'e'g'a's'u' 'y'r'o'm'e'm' 'r'O' 'V8 optimizer & GC struggles to optimize code that uses immutablejs. As a result, it increases memory usage and decreases performance.'o' 'n'a'c' 'u'o'Y' '.'r'e't's'a'f' 'm'a'r'g'o'r'p' 'a' 'e'k'a'm' 't'''n'a'c' 'u'o'Y' '>'n'n'''' ''''''''''''''''''''''''''''''''''''''''''''''''''w' 't'u'b' ','d'a'h' 'e''''''''''''''''''o't' 't's'e'b' 's'y'a'w'l'a' 's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y''I'a'w'y'n'a' 't'u'o' 'w'o''''''''''''''''''''''''''''''''''''''e'r'u't'c'u'r't's' 'a't'a'd' 'e'h't' 'g'n'i'v'o'r'p'm'I'''''''''''''''''''''''''''''e'r'u't'c'u'r't's' 'a't'a'd' '/' ''''''''''''''s't'n'e'm'e'v'o'r'p'm'i' 'c'i'm'h't'i'r'o'g'l'A' '#'#'#'n'n'n'r'h't' 'o't' 't'u'o'b'a' 'e'b' 't'h'g'i'm' 'u'o'y' 'e'd'o'c' '''''''''''t''' ','y'l'i'k'c'u'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'T'D'R'C' '''':'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i's'u' 'y'b' 'e'r'e'h't' 't'o'g' 't'I' '.'t's'a'f' 'y''''''' 't'd'a'e'r'l'a' 's't'i' 'e's'u'a'c'e'b' 'r'e't's'a'f' 't'i' 'e'k'a'm' 'o't' 'w'o'h' 't'u'o'b'a' 't's'o'p' 'g'o'l'b' 'e'l'o'h'w' 'a' 'd'e'e'n' 't'''n's'e'o'd' 's'j'Y'''''''''s'e'o'd' 's'h'''''''s'h'Y't'i'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't's'u'j'''''''''''''''''''''''''''''''''''':'s'i'h't' 'e'k'i'l' 'e'e'r't' 'a' 's'a' 'T'D'R'C' 'e'h't' 'g'n'i't'n'e'm'e'l'p'm'i' 'f'o' 'd'a'e't's'n'I' '.'d'e'c'i't'o'n' 'e's'l'e' 'e'n'o'y'n'a' 'k'n'i'h't' 't'''n'o'd' 'I' 't'a'h't' 'k'c'i'r't' 's'u'o'i''''''''''''''''''''e'h't' 't'u'p' ','o'S'n'n'v'b'o' ','r'e'v'e'l'c' 'a' ''''s'j''s'Y's'''''''''''''o's'l'a' ''' 'a' 'e'k'a'''m'''r'o'v'a'f' 'y'm' 'n'i' 'e'e's' '''''''''''''''''''''''''''''''''''''''i''' ','m'e't'i' 't'n'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'e't'r'e's''''''''''''|' 'e'g'a's'u' 'M'A'R' ''n'i' 'e'b' 'd'l'u'o'h's' '''''''''''''|' '-'-'-'-'-'-'-'-'-' 'm'e't'i' 'w'e'n' 'e'h't' 'n''''''''''''|' ' ' ' 'B'M' '0'8'8' ''o'i't'a'c'o'l' 'e'h't' 'd'''''''''''''''| JS baseline | 0.61s | 0.1 MB |'B'M' '8''''7''''3'2'''''''''''''''|' ' ' ' ' ' ' ' ' ' ' 'n'i'f' 'e'w' 'l'i't'n'u' ''''''''''''''|' ''''|' ' ' ' ' ' ' ' ' ' '''.''''p'i'k'S'''''r'a'p' 'e'h't' 'r'e't'f'a' 't'h'g'i'r' 'g'n'i't'r'a't'S''n'a'c' 'e'w'''''''''''''']'0' ','''h'p'e's''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'r'e'''''''3. Walk up the tree to figure out''''''''''''''''''''''''''''''''''''''''g'n'i't'r'e's'n'i' 'y'l'l'a'u't'c'a' 'e'r'''e'w' 'e'r'e'h'w' '''''''(''''''''''''''''''g'n'i'n'n'a'c's' 'g'n'i'v'o''''''''''''''''''''e'r'u't'c'u'r't's' 'a't'a'd' 'e'r'o''''''''''''''''''''''''''''':'''.'1'''s't'o'p's't'o'h' 'e'c'n'a'm'r'''.'2'''o'f'r'e'p' 'o'w't' 'x'i'f''c' ''m'e'R'''''''''''''''''''e'm'i't' 'r''''''''' 'o't' 'd'e'e'n'''''''a'c'a'e'n'i'l' 'g'n'i'x'i'F' 'x'e'd'n'i' 'e'h't'''''''''''''''''g'n'''''''g'a''''n'i'''i'i's'o'p''''''''''o'p'm'o'r'p''''w'e'''''f''' '' '''''''''s'''' '-'n''''''' '-'n''''t'o'p's't''''d'n'A''''''a' '''' '-'''''''''''''''''y'a'r'r'a' 'e'h't' 'o't'n'i' ''n''''''o'h' ''m'''I''''''''''''''''''''''' 'y'l'l''''''''''''''e's'o'h'''''''''''''''' 'e'v'a'h' 'o's'l'a' 't'h'g'i'm''''''''''n'e'e'b''''''' ',' 'e'v'a'h''t' 'f'o' 'e'm'o's'a'.''u't'c'a''''''''''g'n'i't'r'e's'n'i' 'd'n'a' ','''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't's'a'p'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''':'s'i'h't' 'o'd' 'e'w' ','t'r'e's'n'i' 'y'l'l'a'u't'c'a'''''''''''''''' '''!'s'e'k'i'y' 'e'l'b'u'o'D'n''n' 'e'w' 'n'e'h'w' '''''l'l'i'''w' ''n'e'h't''''''' 'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'f'o'o' 'l''''''' ','l'i't's' 't'u'b' ','+'+'C' 'm'o'r'f' 's'n'e'p'p'a'h' '''''''''''''''''''''''''''''''''''''''''''''''''.'e''''e''' 'o'S''r'e'h't' '''''''''''''''''''s'e'o'd' 'r'e't'u'p'm'o'c' 'e'h't''n'w'o'''d''' 'n'o' 'g'n'i'''''''''''''''''''''t's' 'y'n'a'm' 's'a' ','y'r'r'o'S''o'g' 'y'l'l'a'e'r' 's't'a'h'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'k'a't' 'l'l'i'w' 's'r'''''n'n'''e''''''''''''''''''''''''''''''''''''''' 's'm'e'l'b'o'r'p' 'e's'e'h't' 'f'o' 'h'''''''''''''''''''''''''''''''''''''''' ''''g'n'i'''y''*'b' 'm'e'l'b'o'r'p'*'' 'g'n'i'n'n'a'c'''''''d'e't'i'd''.'W''''e' ''s' 'e'h't' ''''''''''''''''''''y'e'h't' 'e'p'o'h'''s'a'h'' 'n'a'c' 'e'w' 'e'v'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'i'b' 'e'l't't'i'l' 'a' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Yjs does these two optimizations and one more bonus optimization: Humans type in runs of characters.'''''''''''''''''''''''''''''''''''''''''```javascriptnstate = [' { item: 'h', isDeleted: false, id: ['seph', 0], seq, parent: null },' { item: 'e''''h', isDeleted: false, id: ['s'1'''eph', 0], seq, parent'']'0''': ['seph', 1 },' { i'l'''tem: 'e''''h', is'''''''''''''''''''''''''''''' 'y'k's'e'p' 'e's'o'h't'''''''''''''''''''''''''''''n'n'''!'t's'a'f' 'e'b' 'l'l'i'w' 's't'n'e'v'e' 'e'''''''s'd'l'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'n'a''''''''''''''''''''''''''''''''s''''''e'g'n'a'h'''''''''''''''''''''''''''''''''''''''''''''''''''''''''h'c'a'o'r''''o'p'p'a' 's'i'''''' 'h'c'i'h'w''h't''' 'h't'i'w' ''''''''''''''''''''''''''''''''''''''''''''''''R'''''''''''''' 'h't'i'w' ','t's'u'r' 'n'i' 'r'e't's'a'f' 's'i' 'g'n'i'h't'y'r'e'v'E'''''''''''''''''s''''e'e'e'r'T'''''''r't'-'B' 'd'n'a' 't's'u'R'''''''''''''''''''''''''''''''''''''''''''''''' 'y'l'e'm''.'''e'r't'x'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'n'u'o'r'-'''' 'l'l'a' 'e'v'i's''''i's'e'r'p'm'i' 's't'I' '.'e'l'b'i's's'o'p' 's'i'h't' 's'e'k'a'm' 'h'c'i'h'w' 'd'n'a't's'r'e'd'n'u' 't'''n'o'd' 'I' 't'a'h't' '8'V' 'n'i' 'y'r'd'r'a'z'i'w' 'f'o' 's't'r'o's' 'l'l'a' 's'''e'r'e'h't' 'e'r'u's' 'm'''I''''''' 's't'I' '.''''''''''''n'.'s'i'h't' 'r'o'f' 's'e's'u' 's'j'y' 'm'a'r' 'e'l't't'i'l' 'w'o'h' 'd'e'k'c'o'h's''''''''d'e'k'c'o'h'c' 'm''''''''''''y'l't's'e'n'o'h'''''''''' 'y't'l's'e'n'o'h' 'I'n''''''''Moving away from Javascript, and moving away fr'''''''''''''''''''-' 't'i' 'd'e's''''''''['''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''](https://gist.github.com/hellerbarde/2843375)'''t'A'''']'''''''''''''''''''''''''''''''h'c'a'e' ','''e'l's''a'c''''''''''''''''''''''h'c''''''''''h'a'e' 'd'n'A'''''h'c'a'E'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'k'i'l' 's'i' 'e'r'e'h' 's'e'o'd' 't'p'i'r'c's'a'v'a'j' 'e'k'''''''''''''','''''''''''''''''''''''''a' 'y'l'l'a'u''''''''''''''s'e'u'l'c' 'f'o' 'l'l'u'f' ''''t'c'a'''''''''''''''''''''''''''''''''''''''''d'n'i'f' 'l'l'''u'o'y' '''''''''''''''e's''''n'n'''''e'e'e'h'C''' 'r'o' 'e'r'e'h't' '''o'g' 'u'o'y' 'f'i' 'd'n'a' '-' '''''''''''''''''''''''''''''h's'i'u'q's''''.'''''''''''''''''''''''''''' 'e'r'e'h'w''''''''''''y'n'i'''''''g'n'i'y'a's' ''''t' 'a' 'h't'i'w'e'm'o's' 's'e'm'a'n''''T' '.''''''''''''''''''''''''''''''''''''.'s'''''''''' 'w'o''''''''''''''''''''o'd' 'e'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!'')'s't's'i'l' 'd'e'k'n'i'l' 'h't'i'w' 'm'e't'i' 't'x'e''''''''''''''''n' 'e'h't' 'o't' 'e'v'o'm' 'e'w' 'e'm'i't' 'h'c'a'e' 't'n'u'h' 'r'e'g'n'e'v'a'c's' 'a' 's't'i' ','r'e'b'm'e'm'e'R'(' 'l's' 'g'n'o'l'''''''l's''e'o'd' 't'p'i'r'c's'a'v'a'J' 't'a'h'w' 's't'a'h't' 'd'n'a' ','''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''t's'u'r' 'n'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i' '''T'D'R'C' 'a'''''''''''''''''''''''''''''''''''''''''''''e'm'i't' 's'i'h't' ','n'o'i't'a't'n'e'm'e'l'p'm'i'''''''''''s't'i' 'f'o' 'l'''''''''' 'l'a'n'r'e't''''''''''n'r'e'n'i'l'a''''''''m'e'l'p'e'm'i' 'T'D'R'C' 'r'e'h't'o'n'a' 't'e'y''g'n'i'd'l'i'u'b' 'y'l't'e'i'u'q' 'n'e'e'b' 'e'v'''I' 'o'S''''''''''''''''' 'n'e'e'b' 'e'v'''I' 'o'S''' 'e'u'l'c' 'h'c'a''''''''''''' 'h'a'c'''''''''''''''''''' 'n'w'o'd' 'd'n'a' 's's'o'r'c'a''E''''s'e'u'l'c' 't'n'u'h' 'r'e'g'n'e'v'a'c's' 'f'o' 'l'l'''''''''''''''''''''''''''''''''''''''''''.'m'e't'i' 'e'h't' 'd'n'i'f' 'o't' 's'd'a'e'r' '5' 'd'e'e'''''''''' ''''''' 'o's''''''' 'r'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'i'f' 'y'l'k'c'i'u'q''''''''''''''.'''''''''''''''''n'e'v'e'''''I' 'f'i' '' ' '>'-' ''''''f'o' '''g'n'i''''d'n'i'f'''''''''''''''''''''''''''''''''''''''''''''''s'u' 's't'e'l' 't's'u'R'''''''''''''')'*''''(']'0'0'1' ',''''''''s'e'r'o't's'''''''''''''''''''''''''''''''I'''''''''''''''''s'i'h't' 'e'k'i'l' ''I''.'''s'u'o'u'g'i't'n'o'c' 'g'n'i'h't'y'r''''n''''''''''s'y'a'w'''''''I' ''''''''''''e'b''''''''''''''''','t's'a'f' 'f'o' 'g'n'i'k'a'e'p'S'' 'l'l'i'w' 't'i' '''''o's'l'a' 'e'v'e' 'h't'i'w' ','''''h'p'e's'''''''''''''''h'p'e'S'[''''('*'('''''''('*''''(' 'D'I' 'r'i'e'h't' ''''t'y'b' 's'm'e't'i' 'p'u' 'k'o'o'l''''''''''' 'd'n'i'f' 'y'l'i's'a'e' 'n'a'c' 'e'w' 'o's' ','''' '''''c'a'b' 'x'e'd'n'i' 'n'''' 'a' 'g'n'i'r'o't's' 'o's'l'a' 'm'''I'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'n'a' 'k'c'i'r't' 's'''s'j'y' 'e's'u''''''''''''''We can also pack all the items tightly in memory. Each leaf in the b-tree is stored in a single block of memory. At that block we store 32 entries - each storing in''''''''' ' ' ' '?'?'?' turn a span of characters. So inserting *does* need some memcpy-ing, but a little bit of memcpy is fine. Its seriously faster than you think.'n'n''''W'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''W''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n| Test | Time taken | RAM usage |n|''''''''''''''''''''''''''''''''''''''''''''''''''s''''''''''''''''''''''.'y'r'a'r'b'i'l' 'y'm' 'n'i' ''''''''.'t'n'e't'n'o'c' 't'n'e'm'u'c'o'd' 'e'h't' 'e't'a'c'i'l'p'u'd' 'o't' 'e's'n'e's' 'e'k'a'm' 't'''n's'e'o'd' 't'I''''''''''''''u'r't's' 't'a'h't' 'd'n'A' ' -------------------------- | ---------- ''''''''''''''''''''''''' 't'u'b' '.'.''''''e'e'r't'-'B''.'t's'a'f' 'y't't'e'r'p' 's't'I'| -----'*''''''''*'''' 'y'l'l'a'u't'c'a'---- |n| autome''v'''('''rge @ 1.0.0''')'-pr' index''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''?'o'g' 'y'l'l'a'e'r' 'n'a'c' 'y'p'p'u'p' 's'i'h't' 't's'a'f' 'w'o'h' 'e'e's' 'o't' ''''''''''''','>'e'd'o''''''''!'i'a'''''''''''''''''''''''''''''''''''''''''https://docs.rs/ropey/1.2.0/ropey''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s't'i''''''''''''m'''I' 'w'o'n'k'''''''''' '.'.'.' 't's'u'j' 'I' ','k'o'o'L''''''''''''''''''''w''' 't'u'b' ','g'n'i't'a'e'h'c' 's't'I'''''''''''''''''''''''''''''''''?'f'f'o' 't'a'h't' 'n'r'u't' 'I' 'f'i' 's'n'e'p'p'a'h' 't'a'h'W' '.'y'a'w'y'n'a' ''''''''''''''''''''''''''''''''''d'e's'i'm'o'r'p' 's'a' ';''.'r'e't's'a'f' 'x'''' '0'0'0'4'1' '''n'n'.'m'o'o'B'n'm'e'l'b'o'r'p' 's'''e's'l'e' 'e'n'o'e'm'o's'''''''''''''''''''''''''s'''e's'l'e' 'e'n'o'e'm'o's' 'n'i' 'd'e'r'o't's' 'e'b' 'o't' 'g'n'i'o'g'''''''' 'd'e'r'o't's' 's'i' 't'n'e't'n'o'c' 't'a'h't' 'd'n'A' '''n| Test '''''' ' ' '?'?'?' | Time taken | RAM usage |n| -------------------------- | ---------- | '| Rust'' (n'''''''''''t'''''''''n'e't'n'o'c' 'c'o'd'ative) ')' | 0.065s | 2.3 MB |n'--------- |n|''''''''''''' 't'n'e't'n'o''3'2''''''c'1'''''''''''''''''' ' ' ' ' ' ' ' 'g'n'i'r't's' ''''''''''''''''o't's' 't'o'n' ',' automerge (v1.0.0-preview2) | 291s | 880 MB |n| reference-crdts (automerge / yjs) | 31s | 28 MB |n| Yjs (v13.5.5) | 0.97s | 3.6 MB |n| JS baseline | 0.61s | 0.1 MB |n| Rust (Called from JS via WASM) | 0.20s | 2.3 MB |n| Rust (native) | 0.065s | 2.3 MB |n'''''''''''''''''''f'f'o' 't'i' 'n'r'u't' 'I' 'f'I' '''''''''' 'd'n'A' '.'y'e'p'o'r' 'n'a'h't' 'r'e't's'a'f' 's'i' 'e'd'o'c' 'y'M''''I' '?'t'a'h'w' 's's'e'u'g' 't'u'B' '.')'/'(']'y'e'p'o'R'[' 'g'n'i's'u' 'm'''I' 't'n'e't'n'o'c' '''''' 'm'''I' 't'x'e't' 'e'h't' 'r'o'F''''''''''''s'''' 's'e'u'g' 't'u'B'n''h' 'h'o'n' 'e'e'r't'-'b' '>'='''''''''' '>'-'''''''''' '>'=' 'D'I' 'f'o' 'x'e'd'n'I'''''''n'i'<' ':'eview2 '' | 291s | 880 MB |n| reference-crdts (automerge / yjs) | 31s | 'v''' 28 '(''''''''' ' 'MB'''''''''''''''''''' ' ' ' ' ' ' ' ' ' ' ')'5'.'5'.'3'1'@''''#''''$''''&'(' |n| Yjs | 0.97s | 3.6 MB '''| Rust '''''''''''m'o''''a'i'v'''''''''''0''''0'2'''''''''''''''''''''''r'f' 'd'e'l'l'a'C'''''''''+' 'S''0'J''' 'a'i'V'(thro'n| Rust (Called from JS via WASM) | 0.20s | 2.3 MB |'ugh WASM) | 0.65s | 2.3 MB |n''' |n''''''e'n| Rust (native) | 0.065s | 2.3 MB |''''''' ' ' ' ' ' ''v'i't'a'n'| JS baseline |'''''''''''''''''''|' ' ' ' 'B'M' '3'.'2' '|' ''''''''''''''''''''''''''''''''''''''''''''''''n ''''''''''''''''''''''''''''''''''''' index: 't'n'e't'n'o'c' 'e'h't' 'g'n'i'r'o't's' 'e'e'r't'-'B''''''''''''''''''''''''''''''''''''''''''''''h'c'u's' 'd'n'a' 's't'e's'f'f'o' 'd'n'a' 's'n'a'p's' 'g'n'i'r'o't's' 'e'e'r't' 'e'g'n'a'R'<' ':'e'e'r't' ''' '''''''''''','''c'b'a''''''''''''''''''''''''n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'p'o'R'''''''R'<' ':'t'x'e't' '''''''`'`'`'n'}''n 'n ' '{'n'`'`'`'n'n':'s'i'h't' 'e'k'i'l' 's'k'o'o'l' 'e'r'u't'''''''t'u'c'u'r't's' 'a't'a'd' 'e'h't' 'o'S''''S''''''''''''''''''''''''''' 'r'u'o'y' 'e'm'u's's'a' 's'e'm'i't' 'e's'e'h'T'n'n'''' ' ' ' ' ' 0.61s | 0.1 MB '''''''''''''''''''''''''''''''''''''''''''''n| JS baseline | 0.61s | 0.1 MB |'s'5'6'.'0' '|' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ')'M'S'A'W' 'h'g'u'o'r'h't'('''''''''''''''''S'J' 'm'o'r'f' 'd'e'l'l'a'c''''''''b'e'w' 'a'i'v' 't's'u'R' '|'n' |''n'n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o''''''''''''''''''''''''' 'y'l's'u'o'i'r'e's''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'm'i't' 'e'''' 't'u'o''h't' 't'a' 'r''''''''''''''''nWe can also pack all the items tightly in memory. Each leaf in the b-tree is stored in a single block of memory. At that block we store 32 entries - each storing in turn a span of characters. So inserting *does* need some memcpy-ing, but a little bit of memcpy is fine. Its seriously faster than you think.'a't'n''a'd' 'e'''''''w''' ','e'e'S't'a'r'a'p'e's' 'a''e'v'e'l'c' 'd'e'm'e'e's' 't'i' 'e'''s'u'a'c'e'b' ''''''''''''''''' 'd'e'r'o't's' 'e'','''b' 'o't'''''''''''''''''''''''''g'n'i'h't'e'm'o's' 'r'o''''''' 'r' 'r'o't'i'd'e'''''''''''''''''''''''''''''''''''s'''e'r'o't's' 'T'D'R'C' 'y'm''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'c'i'w't' 't'n'e't'n'o'c''' ''nThere's one last thing I've done. I don't know if its a good idea, but I did it anyway because it seemed clever. I moved the content itself out into a separate data structure. See, when you're actually doing collaborative editing, you probably want all the characters in your document to be stored in an actual array, or in VS Code's editor or something. It doesn't make sense to store the content twice. So I made it so my CRDT stores'''''n''''''''' 'o't''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'.'s'e'g'n'a'h'c' 'e'g'r'e'm' 'n'a'c' 't'i' 't'a'h't' 'h'g'u'o'n'e' 't's'u'J' '.'h'c'u's' 'd'n'a' 's'n'a'p's' 'e'h't' '''''' 's'd'e'e'n'''''''' 's'e'r'o't's' ''e'h't' 'e'r'o't's' 'o't' 'e's'n'e's' 'e'k'a'm' 't'''n's'e'o'd' 't'I' '.'r'e'v'e't'a'h'w''''h' 'r'o' 's'e'r'u't'c'u'r't's' 'a't'a'd' 's'''e'd'o'C' 'S'V' 'n'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o't' 't'n'a'w' 'y'l'b'a'b'o'r'p' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'l'''''''l'o'n'o' 'e'r'u't'c'u'r't's' 'a't'a'd' 'T'D'R'C' 'e'h't' 'o's' 't'i' 'e'd'a'm' 'I' 'o'S' '.'g'n'i'h't'e'm'o's' 'r'o' 'g'n'i'r't's' 'l'a'u't'c'a' 'n'a' 'r'o' ','y'a'r'r'a' 'l'a'u't'c'a' 'n'a''''''''''''''''''''''''''''''''''' 'n'i' 't'n'e'm'u'c'o'd'''''w'n'd'o' 'r'u'o'y' 'n'i' 's'r'e't'c'a'r'a'h'''''''r'a'c' 'e'h't' 'l'l'a' 'e'v'a'h' 'u'o'y' ','''' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c' 'g'n'i'o'd' 'y'l'l'a'u't'c'a' 'e'r'''u'o'y' 'n'e'h'W''''S' '.'''''''.'s'e'r'u't'c'u'r't's' 'r'e'h't'o'n'''' 'a' 'o't'n'i' 'f'l'e's't'i' 't'n'e't'n'o'c' 't'x'e't' 'e'h't' 'd'e'v'o'm' 'I' '''''''n'n'.'y'a'w'y'n'a' '''' 't'i' 'd'''''''i' 'i'd''''''''''''''' 's't'i' 't'c'e'p's'u's' 'I' 't'u'b' ','a'e'd'i' 'd'o'o'g' 'a' 's't'i' 'f'i' 'w'o'n'k' 't'''n'o'd' 'I' '.'e'n'o'd' 'e'v'''I' 'g'n'i'h't' 't's'a'l' 'e'n'o' 's'''e'r'e'h'T'n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''i'l'l'i'm' '0'0'2' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'n'A' '.'s'd'n'o'c'e's'i'l'l'i'm''''n' '5'6'''''''''''''''''''''''''''''''''''' 'n'i' 'e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't' 's's'e'c''''e'o'r'p' 'n'a'c' 'e'w''''t' ','t's'u'r' 'm'o'r'f' 'y'l't'c'e'r'i'd' 'd'e'l'l'a'C' '.'s'd'n'o'c'e's' '2'.'0' 'o't' 'n'w'o'd' 'e'r'''e'w''''''''''''''k'r'a'm'h'c'n'e'b' 'e'h't' ','y'l'b'm'e's's''''p'a'b'e'w' 'h'g'u'o'r'h't' 't'p'i'r'c's'a'v'a'j' 'm'o'r'f' 'd'e'l'l'a'C'n'n'?'o'g' 't'i' 's'e'o'd' ''''?'t's'a'f''''m' 'w'o'h' ','y'a'w'y'n'A'n'n'.'''''''''''''''''''''k'n'i'h't' 'u'o'y' 'n'a'h't' 'r'e't's'a'f' 's't'I' '.'e'n'i'f' 's'i' ' 't'i'b' 'e'l't't'i'l' 'a' ''''''''''y'p'c'm'e'm'''''''''''-' 'e'n'''''' 'l'l'i't's''i'f' 's'''''''g'n'i'o'd' 't'i' '''''''''''''''''''''''''''''''''''''''''''''y'l'e'v''''e'''i'''t'i'u't'n'i'''''''i'u' ''''''''''''''''''''''''''r'e't's'a'f' 'h'c'u'M' '.'s'i' 't'i' 'k'n'i'h't' 'u'o'y' 'n'a'h't' 'r'e't's'a'f' 'y'l's'u'o'i'r'e's' 's't'a'h't''''''''''m'''I''''''s't'a'h't' 't'u'b' ','g'n'i'-'y'p''''''''''y'p'o'c'm'e'm' 'e'm'o's'''''''''''''y'p'c'm'e'm' 'w'e'f' 'a' 'd'e'e'n' '*'s'e'o'd'*' 'g'n'i't'r'e's'n'i' 'o'S'''''' 's'i'h'T' ''''''''''h'T' '.'s'r'e't'c'a'r'a'h'c' 'f'o' 'n'a'p's' 'a' 'n'r'u't' 'n'i' 'g'n'i'r'o't's' 'h'c'a'e' '-' 's'e'i'r't'n'e' '2'3' 'e'r'o't's' 'e'w' 'k'c'o'l'b' 't'a'h't' 't'A'''''''''''' 'k'c'o'l'b' 't'a'h'T' '.'y'r'o'm'e'm' 'f'o'''''''o'f' 'k'c'o'l'b' 'e'l'g'n'i's' 'a' 'n'i' 'd'e'r'o't's' 's'i' 'e'e'r't'-'b' 'e'h't' 'n'i' 'f'a'e'l' 'h'c'a'E' '.'y'r'o'm'e'm' 'n'i' 'y'l't'h'g'i't' 's'm'e't'i' 'e'h't' 'l'l'a' 'k'c'a'p' 'o's'l'a' 'n'a'c' 'e''''In Javascript we can't even pack a single item into contiguous memory. In rust we can pack groups of 32 items all together in chunks. This will result in some memcpy-ing when we insert, but thats faster than you think.n'''''e'W'''''''' 't's'a''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n''''''n'''n'.'y'a'w'y'n'a' 't's'a'f' 'y'l'l'a'e'r' 's't'i' 't'u'B' '.'t'e'y' 't'a'h't' 'd'e'i'r't'''''''''h't' 'd'e'u'r't' 't'''n'e'v'a'h' 'I' '.'l'''''''''n'o'i't'a'c'o'l' 'e'h't' 'e'h'c'a'c' '*'o's'l'a'*' 'o't' 't'e'y''''''n'''''n''e''n't' 'r'e't's'a'f' 'e'b'''''''l'a' 't'h'g'i'm' 't'I'n'n'.'y'a'r'r'a' 't'p'i'r'c's'a'v'a'j' 't'a'h't''''''''''''''e'''' 'd'e'e'n' 'e'w''''n' 'n'e'h'w''''e'e'n' 'n'a'h't' '''e'm'a's' 'e'h't'''n' 'y'l'n'o' 'e'w' 'o's' ',''''u'f' 's'i' 't's'i'l' 'r'''t''e'v''''s'i'l' 'r'u'o'y' 'n'i' ''i'l' 'y'r'o'm'e'm' 'g'n'i'g'n'a'r'r'A' ''''.'''' 'd'n'A'''')'t'a'e'b' 't'r'a'e'h' 'a' 't'u'''''''''''s'e't'u'n'i'm' '2''''''o'b'a'(' ''a't's' 'e'm'i't' 's'i'h't' 'n'O' '.'e'v'i't'i'u't'n'i' 'e'r'o'm' 't'i' 'e'k'a'm' 'o't' 'n'o'i'l'l'i'b' '1' 'y'b' 'e'm'i't' 'r'e't'u'p'm'o'c' 'p'u' 'e'l'a'c's' 'n'a'c' 'e'W''s'e'u'g'''''''''i' 'd'e's'e'u'g' 'u'o'y' '-' 'om linked lists'''''''''' 'r'e't't'e'B''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't'u'b' 't'i' 'y'a's' 'o't' 'd'a's' 'm'''''''''''''''''''''''''''''''''''''''.'''''''''''''''''''''''''' 'o't' 'e'u'n'i't'n'''''o'c''''''''''''''''''''''''''''''''''''''''' 'e'n'i'g'a'm'I''''''''''''''''''t''''''javascript'''''n'o's'j'''''''''''t'p'i'r'c's'a'v'a'j'''{ ''*'''''r'u'o'Y''''C''''''''*'''''''''''''''''''''''''''''''''''''''.'s'r'''''''''''''''''l'l'a' '''''''''''''s'e'x'o'b' 'e's'e'h't' 'o't'n''''''''s'i'h'T'''''n't''''e'h'T' '' '.''''i' 'a't'a''''' 'p'e'''f'o' ''e'k''''''''''''' 's'i' 'h'''''''''''''e'w' 'r'e't'a'L''O'c'i'h''''''''''''''''''''''''''''''''''''''' '.'*'e'r'e'h'w'y'n'a'*' 'e'b' 'd'l'u'o'c' 't'i' 'd'n'a' ','''a''',''''''t'a'd' 't'a'h't''w' ','''''' '''d'''''''''''''o't' 'g'n'i'o'g' 'e'r''' 't'u'p''e't'n'i'o'p' 'y'b' 'd'e't'a''''''''''''''''''t'i' 'd'a'e'r' 'o't' 'd'e'e'n' 'e'w''''r'a'p'e's'''''''''''''''''''''''''a' 'e't'o'r'w''''''''''''''''''''''''''''''''''''''''e'm'i't' 's'i'h'T' '.''''''''' ','m'e't'i' 'h'c'a'e''''''''''''''''''''''''''''''''''''B' '.')'s'n'a'p's' 's'''s'j'y' 'g'n'i'd'u'l'c'n'i'(' '''''''''''' '''''''n'n'''''''''''''''''''''''''''''''''''''''''''''''''M'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'o'g''''''''''''''''''''''''''''''''''''' '-'n'n':'''''''''''''' 'e'''''''''''''n'o'i't'''i's'o'p' 't'a' 'h't''''o't' 'a't''''''r'u'o''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e's'a'c' 's'''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'n'e'v'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'k'n'i'h't' 'u'o'y' 'n'a'h't' 'r'e't's'a'f' 's't'a'h't''''''''''''''''''''''''''' 'n'a'h't' 'r'e't's'a'f' 'y'a'w' 's'i' 'y'p'c'm'e'm' 't'u'b' ','t'r'e's'n'i' 'e'w' 'n'e'h'w' 'g'n'i'-'y'p'c'm'e'm' 'e'm'o's''''''''''''''''y'p'''''''p'o'c'm'e'm' 'f'o' 't'i'b' 'a' 'n'i' 't'l'u's'e'r' 'l'l'i'w' 's'i'h'T' '.'s'k'n'u'h'c' 'n'i' 'r'e'h't'e'g'o't' 'l'l'a''''t' 's'p'u'o'r'g' 'k'c'a'p' ''''''''''''''''''n'a'c' 'e'w' ','t'c''''''''''''''''''''h't'i'w'''A''''''''A' '.'' 'e'e'r't' 'r'u'o''''r' 'n'i' 'a'f' 'n'I' '!'''''''''''''''''''''h'c'a'e' ''''''''''''''''''''''''''''' 'r'e'h't'e'g'o't' 'l'l'a''.''' 's'm'e't'i' '2'3' 'h't'i'w'''''''''''''''''''''''''''''k'n'u'h'c' 'y'r'o'm'e'm' 'e'l'g'n'i's' 'a' 'o't'n'i' 'k'c'a'p' 'n'a'c' 'e'w' 't's'u'r' 'n'I' '.'y'r'o'm'e'm' 's'u'o'u'g'i't'n'o'c''''e'h't' 'o't'n'i' 'm'e't'i' 'e'l'g'n'i's' 'a' 'k'c'a'p' 't'''n'a'c' 'e'w' 't'p'i'r'c's'a'v'a'J' 'n''''''''''j' 'n'I'''''n'n'!'y'a'r''''a'r'a' 't'p'i'r'c's'a'v'a'j'''' ' 'r'u'o' 'n'i' 'm'e't'i'''''''i't' 'y'r'e'v'e' 't'f'i'h's' 'o't' 'g'n'i'd'e'e'n' 'n'a'h't' 'r'e't't'e'b' 'h'c'u'M' ''n'e'p'p'a'h' 'i'h't' 'n'i''''''''''''''''.'t'a'h'w' 'r'e't't'a'm' 'o'n' 's'p'e't's' '5' 't'u'o'b'a' 'r'o' '-' ')'h't'p'e'd'('O' 's'e'k'a't' 't'i' '-' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''l'l'i'l'p's' 'e'w' ','e's'a'c' 't's'r'o'w' 'e'h't' 'n'I'''''''''''''''''e's'a'c' 't's'r'o'w' 'e'h'T' '.'t'n'e'r'a'p' 'e'h't' 'n'i' 't'r'e's'n'i' 'd'n'a' 'm'e't'i' 't'n'e'r'r'u'c' 'e'h't' 't'i'l'p's' ''''''''' 'e'w' ','t'o'n' 'f'I' '.'e'r'e'h't' 't'n'e't'n'o'c' 'w'e'n' 'e'h't' 't'r'e's'n'i' 't's'u'j' 'e'w' ','m'e't'i' 't'n'e'r'r'u'c' 'e'h't' 'n'i' 'm'o'o'r' 's'''e'r'e'h't' 'f'I' ''''''''''''''''''''''''n'i' 't's'u'j' 'n'a'c' 'e'w' 'y'l'l'a'u's'U' '.'o'o't' 't's'a'f'''''' 'y's'a'e' 's'i' 'e'e'r't' 'e'h't' 'n'i' 'g'n'i't'a'd'p'U' '-'n''e'''n'''''a'c' 'e'w' '''''''''t's'u'j' 'n'i''''''''''''''''''''''''''''''''''''''''''''''''''s'l''''r'u'o' ''e'v'e'l' '5''''''' '4' 's'd'e'e'n' 'y'l'n'o''''''''''''''''''''''''''''''''''''''''''''*'''''''''''''e's'o''.'s''''h't' 'o'd' '*''''''''' 'n'a'c's' 'r'e'v''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'a' ','r'e'z'i'm'i't'p'''''''''''''''''''''''''''''y'r'o'''m'e'm' 'n'i' 'e'c'''''a'l'p' ''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'W' '.'b'e'w' 'e'''''''''''https://github.com/josephg/text-crdt-rust''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''i''' '''''''''''''''- It''''''''''t'-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d''' 'e'e'r't'-'B'''''''''''''e'r'e'h' 'm'a'r'g'a'i'D' '>'n'n''''This solves both of our linear scanning problems from earlier. When we want to find item 50 000 in the list, we can just tr''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'y'r'o'm'e'm' 'f'o' 'k'n'u'h'c' 'e'm'a's' 'e'h't' 'o't'n'i' 's'm'e't'i' '2'3' 'f'o' 'p'u'o'r'g' 'e'l'o'h'w' 'a' 's'k'c'a'p' ')'a't'a'd' 'l'a'u't'c'a' 'e'h't' 'e'r'o't's' 'e'w' 'e'r'e'h'w'(' 'e'd'o'n' 'f'a'e'l' 'h'c'a'E''''''''''''' 'a'e'W'n'n'.'e'e'r't' 'e'h't' 'n'i' 's'r'e'y'a'l''''l' '5' 's'd'e'e'n' 't's'u'j'''''''j' ' 't'n'e'm'u'c'o'd' 'e'l'o'h'w''''''''''o'h's' 's'i'h't'averse down the tree. Trees are very tidy - storing all these items we just need 5''This solves both of our linear scanning problems from earlier'''''''''''''''''''''''''w''''''''''0'0'0'0' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '5' 'd'e'e'n' 't's'u'j' 'e'w' 's'm'e't'i' 'e's'e'h't' 'l'l'a' 'g'n'i'r'o't's' '-' 'y'd'i't' 'y'r'e'v''''''''''''''''''''''''''''''''''''''s'm'e'''''''e'm't'i' 'e's'e'h't' 'l'l'a' 'g'n'i'r'o't's' '-' 'y'd''''y'i't' 'y'l'l'a'e'r' 'e'r'a' 's'e'e'r'T''''' 'e'h'T' '.'e'e'r't' 'e'h't' 'n'w'o'd' 'e's'r'e'v'a'r't' 't's'u'j' 'n'a'c' 'e'w' ',''0'5'''''''''''''0'0'0'1' ''''''''''''''''''''''''t's'i'l' 'e'h't' 'n'i' 'm'e't'i' 'h'c'i'h'w'''''''''''''''''''''''''''''' ','t'r'e's'n'i' 'o't' 't's'i'l' 'e'h't' 'n'i' 'e'r'e'h'w' 'd'n'i'f' 'o't' 't'n'a'w' 'e'w' 'n'e'h'W' '.'n'n'''''''''''''''''''''''.'n'e'r'd'l'i'h'c' 's'''m'e't'i' 't'a'h't' 'f'o' 'l'l'a' 'f'o' 'h't'g'n'e'l'''''''''''''''''''''''''''.'r'e'i'l'r'a'e' 'm'o'r'f''''''''''m'o'r' 's'm'e'l'b'o'r'p' 'g'n'i'n'n'a'c's' 'r'a'e'n'i'l' 'r'u'o' 'f'o' 'h't'o'b' 's'e'v'l'o's' 's'i'h'T' '''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' 'r'e'b'm'u'n' 'e'h't' 'e'r'o't's' 'e'w' 'e'e'r't'-'b' 'e'h't' 'f'o' 'e'd'o'n' 'h'c'a''''c'e' 't'A'''''''''''' 'e'e'r't'-'b' 'e'h'T'''''''a' 's'i'h'T' '.'s'm'e't'i' 'e'h't' 'e'r'o'''''''o'r't's' 'o't' 't's'i'l' 'd'e'k'n'i'l' 'a''''''''''' 'f'o' 'd'a'e't's'n'i' 'e'e'r'T'-'B' 'a' 's'e's'u' doesn't'''''''''''''' 't'''n's'e'o'd' 't'I' '-'n'n':'t'u'b' 's'j'y' 's'a' 'e'm'a's' 'e'h't' 'y'l'l'a'i't'n'e''''n's's'e' 's'i' ''''''''''''''''''''''''' 's'''s'j'y' 's'e'o'D' '-'n'n':'''''''''''''''''l'l'a' 's'a'h' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 's'i'h'T' '.'t's'u'R' 'n'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''t'n'e'm'l'e'p'm'i' 'T'D'R'C'''''''''''''''n'o'i't'a't'n'e'm'e'l'p'm'i' 'r'e'h't'o'n'a' 't'e'y' 'g'n'i'd''''d'l'i'u'b'''''''''''a' 'g'n'i'd'i'l'u'b' 'y'l't'e'''''''e't'i'u'q' 'n'e'e'b' 'e'v'''I' ')'/'(']'e'r'e'H'['''''''e'['n'n'h't' 'n'o' 'n'e'v'e' ',''''''' '.'e'r'o'm' 'y''''''''''o'm't'n'a' 't'p'i'r'c's'a'v'a'j''''''''p'p'a' 'b'e'w' 'e't'i'r'w' 'o't' 'd'e'e'n' 't'''n'o'd' '''''''''''''''''''.'y'l'b'm'e's's'a'b'e'w' 'e'v'a'h' 'e'w' ''''''''''''''''''' 'e'r'o'm' 'e'n'o' 's'''e'r'e'h't' ','k'o' 's't'i' 't'u'B''''B'n'n''''a'h' ''e'h't' 'r'e'v'o' 'l'l'a''''o' ''o' 'e'h't' 'e's'u'f'n'o'c' '''''''''''''''''''''''''''''''''''''e'r'o''''''''''''''n'o'i't'a't'n'e'm'g'a'r'f' ''m' 'd'n'a' 's't'c'e'j'b'o' '''''''''''''''''''''''''''''''''''''''''''e'h't' 'f'o' 't'r'o's' 's't''''s''''''' 'n'I' '.''''''''''''''''''''''''s'e'r'u't'c'u'r't's' 'a't'a'd' 'r'e'v'e'l'C' '.''''y'r'o'm'e'm' 'd'e't'n'e'm'g'a'r'f' 'e'r'o'm' 'n'e'v'e' 'h't'i'w''''a'r'f' 'p'u' 'd'n'e' 'e'w''''''''''''''''''''''''''''' 'o't' 's'u' 's'e'c'r'o'f''''''''''''''(' 's'u' 's't'h'g'i'f' 'e'g'a'u'g'n'a'l' 'e'h't' ','t'p'i'r'c's'a'v'a'j' 'n'i' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'y'c'n'a'f''''e' 'o't' 't'n'a'w' 't'''n'o'd' 'e'w' 'd'n'a' 't'n'e'm'u'c'o'd' 'e'h't' 'd'n'u'o'r'a' 'p'o'h' 's'e'm'i't'e'm'o's' '*'s'e'o'd'*' 'r'e's'u' 'e'h't' ','e'r'a' 'y'e'h't' 's'a' 'r'e'v'e'l'c' 's'a' '-' 's't's'i'l' 'd'e'k'n'i'l' 'm'o'r'f' 'y'a'w'a' 'e'v'o'm' 'o't' 'd'e'e'a'd' '''''''''''''''''''''''''''''''''''''n' 'e'w' 'd'n'A' '.'r'e'h't'e'g'o't' 's'd'l'e'i'f' 'e'h't' 'l'l'a' 'e'v'o'm' 'o't' 'd'e'e'n' 'e'w' ','r'e't's'a'f' 'n'u'r' 'o'T''''''''' 'y'l'l'a'e'd'I'n''n''.'''s'e'g'a' 'e'k'a't' 'd'l'u'o'w' 't's'i'l' 'e'l'o'h'w' 'e'h't' 'g'n'i'd'a'e'R' ''''''.'n'e'd'd'i'h' 's'i' 't'i' 'n'o' '''k'l'i'm''' 'h't'i'w' 'e't'o'n' 'e'h't' 'e's'u'o'h' 'r'u'o'y' 'n'i' 'e'r'e'h'w' 'g'n'i'b'i'r'c's'e'd' '''''''''''''''''''''''t'n'u'h' 'r'e'g'n'e'v'a'c's' 'e'l't't'i'l' 'a' 'd'a'h' 'u'o'y' '''k''''i'l'i'M''''i''''''''''l'i'm''' 'g'n'i't'i'r'w' 'f'o' 'd'a'e't's'n'i' 't'u'b' ',' ''''''''''''''''''t's'i'l' 'g'n'i'p'p'o'h's' 'r'u'o'y' 'f'i' 'e'k'i'l' 's't'I' ' '*''s'i' 'a''''''''''''''''''''''''''''''''''y'l'l'a'u''''''''''''''t'i' 'h'c't'e'f''''''''''''''''''''w'o'l's' 'o's'l'a''''a' 's'i' 'h'c'i'h'w' ','' 'o'g' ''s'u' 'r'e't'u'p'm'o'c' 'r'u'o'y' ','t'i' 'd'a'e'r' 'o'T''Y'*''t'a'd' '''''' ''''''''''''''''''''''y'''n''n'''We can't fix this in javascript. If we make our data structures more complex, we run into the same limitations Automerge has with immutablejs - which is, if we make our data structures complex,''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ','x'''','e'l'p'm'o'c''''o' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'r'u'o' 'e'k'a'm' 'e'w' 'f'i''''' 'e'h't' ','s'i' 'h'c'i'h'w' '-' 's'j'e'l'b'a't'u'm'm'i' 'h't'i'w' 's'a'h' 'e'g'r'e'm'o't'u'A' 's'n'o'i't'a't'i'm'i'l' 'e'm'a's' 'e'h't' 'o't'n'i' 'n'u'r' 'e'w' ','x'e'l'p'm'o'c' 'e'r'o'm' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'r'u'o' 'e'k'a'm' 'e'w' 'f'I' '.'t'p'i'r'c's'a'v'a'j' 'n'i' 's'i'h't' 'x'i'f' '''''''''''''''''''a'v'a'j' 'n'i' 'r'e't't'e'b' 'o'd' 't'''n'a'c' 'e'W'n'n'l'l'a'u's'u'l'l'i'w' ''e'h't' 'l'l'A'n''n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''''''''''''''''''''''''''''''''','l'l'e'w' ','e'r'e'h't' 's'i' 'a't'a'd'''e'm' 'e'h't' 'e'c'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''m'''o'r'f' 'd'''''''''''''''''''''''f'i' ','''''''''''e'k'a't' '''''f'i' 'e'm'i't' 'r'e't'u'p'm'o'c' 'n''''''' 'f'I'''''' 'n'I' ''a'e'r' 'o't' 's'd'e'e'n' 'r'e't'u'p'm'o'c' 'r'u'o'y' ','''a't'a'd' 't'a'h't' 'h'c't'e'f'''''d'a'e'r' 'o't' 'r'e'd'r'o' 'n'I' '.'e'r'e'h'w'y'n'a' 'e'b' 'd'l'u'o'c' 'r'e't'n'i'o'p' 'a' 'f'o' 'd'n'e' 'r'e'h't'o'''''''o'e' 'e'h't' 't'a' 'a't'a'd' 'e'h'T''o' 'd'n'A'n'')'w'o'l's' 'o's'l'a'(' 'g'n'i'''p'e'e''''''''''''''''''''''''a't'a'd' 't'a'h't' 'h'c't'e'f' 'd'n'a' 'o'g' 'k'''' 'k'o'o'b' 'e'm'o's' 'o'd' 'd'n'a' ''''''' ','y'r'o'm'e'm' 't'a'h't' 'k'c'a'r't'''''''''''' 'd'n'a't's'r'e'd'n'u' 'o't' 's'd'e'e'n' 'r'o'''''''d'e't'c'e'l'l'o'c' 'e'g'a'b'r'a'g' 'e'h'T' '.'w'o'l's' 's'i''''''l's' 'i's' 'h'c'i'h'w' ',''''''''''h't'i'w' 'y'r'o'm'e'm' 'e't'a'c'o'l'l'a' 'o't' 's'a'h' 'r'e't'u'p'm'o'c' 'e'h't' ','e'r'e'h't' 't'e'g' 'o'T'n'n'''''''''e''' ','e'e'''''' 't'a'h't'S'.'s'i'h't' 's'e'''t'a'h' 'r'e''''''''''''''''''''''''''''''''''''''''''''''''''''' 'y'l'l'''a'''''''a't'a'd' ''''''''''''''''''''''''''''''''k'o'o't' 's'd'''''''''''''''''''''''''y'r'o'm'e'm' ''''''' ''2't'u'o'b''n'i'a'm'''''''m'a' 'm'o'r'f' 'g'n'i'd'a'e''''''n'n''r' ''a'e'r' 'e'h'c'a'c' '1'L''''''''''''''''''''''''''''''''''''''''','s'd'n'o'c'e's' '5'.'0' 'k'o'o't' 's'e's's'e'c'c'a' 'y'r'o'm'e'm' 'l'a'm'r'o'n''''''' 'y'r'e'v'e' 'f'I' '.'''''''''e'r' ''u's'u'''''''''''' 'o't' 's'd'e'e'n' 'r'e't'u'p'm'o'c'''''''e't'u'p'o'c''''o' 'r'u'o'y' ','r'e't'n'i'o'p' 'a' 'w'o'l'l'o'f' 'o't' 'r'e'd'r'o' 'n'I't'u'p'm'o'c' 'e'h'T''''''''''''''''''''''''''''''''.'r'e't'u'p'm'o'c' 'e'h't' 'r'o'f' 'l'u'f'w'a' 's'i' 's'i'h'T'n''n'i'Each part of the data structure is connected to the rest via pointers. In modern computers, following pointers is really slow. If the computer did 1 clock cycle every second, reading data from main memory would take a [couple of minutes](https://gist.github.com/hellerbarde/2843375).''''''0'0'1'''tem: ''''''''''']'2' ','''e'k'i'm'''''''''e's'[''''hello', isDeleted: fa'''''''''''''''''''''''''''''''''''''y'l'''''''''''''''''''''d'i'd' 'r'e't'u'''''y'''r'e'v'e''''''''''''''''''''''''''''''''''''''''''['''''''''''''''''''https://gist.github.com/hellerbarde/284337''' '.')'5'(']'''s'e't'u'n'i'm' 'f'o' 'e'l'p'u'o'c'''''''''''''''.'s'e't'u'n'i'm' 'w'e'f' 'a' '''''e'k'a't' 'd'l'u'o'w' 'y'r'o'm'e'm' 'n'i'a'm' 'm'o'r'f' 'a't'a'd' 'g'n'i'd'a'e'r'''p'm'o'c' 'e'h't' 'f'''''' 'g'n'i'o'd''I''''''''''''''''''''t' 'r'e't'u'p'm'o'c' 'e'h't' 'y'l'a'e'r' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(' 'r'e't'n'i'o'p' 'a' 'g'n'i'w'o'l'l'o'f' ','d'n'o'c'e's' '1' 's'a'w' 'e'l'c'y'c' 'k'c'o'l'c' '1' 'f'I' '.'w'o'l's' ''''''' 's'y'r'e'v' 'y'l'l'a'u't'c'a' 's'i' 's''''e'r'e't'n'i'o'p' 'g'n'i'w'o'l'l'o'f' ','s'r'e't'u'p'm'o'c' 'n'r'e'd'o'm' 'n'I'''''''''''''''' ','y'l'e't'a'n'u't'''''''n'u'r'o'f'n'U' '.'s'r'e't'n'i'o'p' 'a'i'v' 't's'e'r' 'e'h't' 'o't' 'd'e't'c'e'n'n'o'c''''''''''''''''''''''''t's'e'r' 'e'h't' 'm'o'r'f' 'd'e't'a'r'a'p'e's' 's'i' 'e'r'u't'c'u'r't's' 'a't'a'd'''''''t'c'e'j'b'o' 'e'h't' 'f'o' 't'r'a'p' 'h'c'a'E''''''''''''''' '''''''''''''''''''''''''''''''''''''''Note how each''''''''''''''' 'h'c'a'e' 'w'o'h' 'e't'o'N'n'n''''''''''.'.'.'m'a'r'g'a'i'D' '>'n'n':'s'i'h't' 'e'k'''''''k'e'i'l' 's'k'o'o'l' 'y'l'l'a'u't'c'a' 't'c'e'j'b'o' 's'i'h'T'n'n'lse, id: ['seph', 0], seq, parent: null ''''`'`'`'n'}'n'`'`'`'n'p'i'r'c's'a'v'a'j' 'n'i' '''''''''''''''''''''''''''''''''''''''n'n':'s'i'h't' 'e'k'i'l' 't'c'e'j'b'o' 'n'a' ','t'p'i'r'c's'a'v'a'j' 'n'I'n'n'.'y'r'o'm'e'm' 'f'o' 'e's'u' 'r'e't't'e'b' 'e'k'a'm''''''''''''y'r'o'm'e'm' 'k'c'a'p' 'o't'''''''''''''''''''''''''''''''''''''''''''y'r'o'm'e'm' 'n'i' 's'd'a'e'r' 'r'e'w'e'f' 'o'd' 'o't' 'r'e't'u'p'm'o'c' 'e'h't' ''' '''o't' 't'n'a'w' 'e'w' 'f'I'''''''''''''''''''' 'd'n'a' ',''''.'y'd'a'e'r'l'a' '''','''' 'd'e'z'i'm'i't'p'o' 'l'l'e'w' 'y'r'e'v' 's'i' 's'j'Y' 'I''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''f'o' 'r'e'b'm'u'n' 'e'h't' 'g'n'i's'a'e'r'c'e'd' 't'r'a't's' 'o't' 'd'e'e'n' 'e'w' ','e'r'o'm' 'e'c'n'a'm'r'o'f'r'e'p' 'e'v'o'r'p'm'i' 'o'T' '.'s'i'h't' 'n'a'h't' 'r'e't's'a'f' 'h'c'u'm' 'o'g' 't'''n'o'w' 't'p'i'r'c's'a'v'a''''''''''''' 't's'u'J''''''''''''t'''n's'i' 'e'r'e'h'T'''''''''''''''''''o'f'r'e'p' 'g'i'b' 't'x'e'n' 'e'h'T'n'n's't's'i'l' 'd'e'k'n'i'l' 'm'o'r'f' 'y'a'w'a' 'g'n'i'v'o'm' 'd'n'a' ','t'p'i'r'c's'a'v'a'J''''''''f'c's'a'v'A'J' 'm'o'r'f' 'y'a'w'a' 'g'n'i'v'o'M' '#'#'#'n''n'c''''''k'c'i'r't''i'h't' ','e'n'o'd' 'd'n'a' 'd'i'a''''''''''''' 'd''''''''''''''''''''''''''''''''''''''''''''s'i' 't'l'u's''''''''''''''''''''''''''''''''''':'M'A'R' 'h'c'u'm' 's'a''''o' '%'0'1' 't'u'o'b'a''''g'n'i's'u' 'e'r'''e'w' ''e'r' 'e'h'T' '.''''''''''''''''''' 'd'n'a' ','t'a'e'r'g' 'm'r'o'f'r'e'p' 's'e'g'n'a'h'c' 'e's'e'h'T''i'a's' 's'i' 'l'l'a' 'n'e'h'w'p's' 'e's'e'h't' 'f'o' 'e'n'''''''''' 'n'e'o''''''''''i'l' 'n'a'p's' 'a' 'f'o' 'e'l'd'd'i'm' 'e'h't' 'n'i' 'g'n'i'h't'e'm'o's' 's't'r'e's'n'i' 'r'e't'a'l' 'r'e'''s'''''B'M'''1'.'0''''''u' 'e'h't' 'f'i' 't'u'o' 'k'c'a'b' 's'm'e't'i' 't'i'l'p's' 'o't' 'c'i'g'o'l' 'l'a'i'c'e'p's' 'e'm'''''''e' 'o's' 'd'e'e'n' 'l'l'''e'w' 'd'n'A' '.'''i'''''''i'''''''''''''s'd'l'i'e'f' ''t's'a'p' 'y'l'l'a'n'i'F' '''''''''''''k'n'i'l' 'a' 'n'i' 't'u'B'n'n'Deleted:'2''' '''2'false, id']': ['seph', 0], seq, par'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'''f''''u'B' '.'s'i'h't' 'e'k'i'l''''''''''i'l' ''''r'u'o' 'I''p'u' 'e'n'i'l'''''''''''''''r'e''''''''''''''''''''''''''''''''''''''''''''''':'M'A'R' 'h'c'u'm' 's'a' 'h't'0'1'/'1' 'r'e'v'o' 't's'u'j' 's'e's'u' 'd'n'a' ''''''''''''''''''''''''''''''''''''''':'r'e't's'a'f' 'x'0'3' 's't'i' '-' '''':'*'t'a'e'r'g'*' 's'm'r'o'f'r'e'p' 't'i' 'd'n'A'n'n''''| Test | Time taken | RAM usage |n| -------------------------- | ---------- | '''''B'M' '8''''7'2'--------- |n| automerg'| reference-crdts (automerge / yjs) | 31s | |n'''''''''''''''''''''''''''''''''' ' '''''s'7'9'.''''6''''7'.''''B'M' '3'0'''''' '''''''''.'0' '''''' ''' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 's'j'Y'e @ 1.0.0-preview2 | 291s | 880 MB |n| reference-crdts (automerge / yjs) | 31s | |n| JS baseline | 0.61s | |n'n'n'''t'f'a' 'e'n'o' 'e'm'o'c' 's'm'e't''''i''''''''''e'm't'i' 'e'h't' 'l'l'a' 'n'e'h'w' 's'k'r'o'w' 'y'l'n'o'''''''o'i' 's'i'h't' '-' 's'i'h't' 'e'k'i'l' 't's'i'l' 'e'l'o'h'w' 'e'h't' 'e's'p'a'l'l'o'c' 't'''n'a'c' 'e'W' 'ent: ''''' 's'i'h't'['sep'''''''''''''n'o'i't'a'z'i'm'i't'p'o' 'h', 'l'''1 },' { item: '3''''h', isDelet'']'2'''ed: false, id: ['seph', 0], seq, parent: ['se'o'''ph', 1 },n'4''''n'n''']'3'''n'n'''''''''''''''''':''```javascriptnstate = [n { item: '''''o'l'l'e'h', isDeleted: false, id: ['seph', 0], seq, parent:'' nul''Aaah much better! For our benchmark, this reduces the number of items in the list from 180 000 down to about 40 000. And it''''''''''''''''''''''''''''''''''''','t''''k'r'a'm'h'c'n'e'b' 'r'u'o' 'r'o'F' '''''''''''''''''''''''''''''''''''''''''''''' 't'i' 'd'n'A' '.'''0'0'0' '0'4' 't'u'o'b'a' 'o't' 'n'w'o'd' '0'0'0' '0'8'1' 'm'o'r'f' ''''''''''''''''''''''''''''''''''''''''''''t's'i'l' 'e'h't' 'n'i' 's'm'e't'i''i' 'f'o' 'r'e'b'm'u'n' 'e'h't' 's'e'c'u'd'''''''c'u'e'r' 's'i'h'T' '!'r'e't't'e'b' 'h'c'u'm' 'h'a'a'A'n''n'l },n { item: 'e', isDeleted: false, id: ['seph', 1], seq, parent: ['seph', 0] },n { item: 'l', isDeleted: false, id: ['seph', 2], seq, parent: ['seph', 1] },n { item: 'l', isDeleted: false, id: ['seph', 3], seq, parent: ['seph', 2] },n { item: 'o', isDeleted: false, id: ['seph', 4], seq, parent: ['seph', 3] },n]n```'n''s'e'r'o't's' 't's'u'j' 's'j'Y'n'n' { item: 'h''''a', isDeleted: false, id: ['seph', 0], seq, ''''''''''1' ''','''h'p'e's'''['''parent: null },n { i'e'''tem: 'X', isDeleted: false, id, seq, parent: ['seph', 0] },n'l''' { item: '''''e'''s'l'a'f''b', isDeleted: true, id, seq, parent:' { item: 'l', isDeleted: false, id, seq, parent: [..] },n' ['seph','o''' 0'l'''] },n { item: 'c', isDeleted: fal''s''e, id, seq, parent: [..] },n ...n]n```n'n'n':'g'n'i'r'o't's' 'f'o' 'd'a'e't's'n'i' ','''o'l'l'e'h''' 'e'p'y't' 'I' 'f'I' Instead of typing'' a''Yjs does these two optimizations and one''''' 'e'r'o'm' bonus optimizat''i''on: Humans also type in runs of characters. Instead o'''''''' ' 'a'''''''' 'a' 'g'n'i'p'y't' 'f''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' 'd'a'e't's'n'I' '.'s'r'e't'c'a'r'a'h'c' 'f'o' 's'n'u'r' 'n'i' 'e'p'y't' 'o's'l'a' 's'n'a'm'u'H''''U'''''''''''''''''''g'n'i'r'o't's' 'f'o' 'd'a'e't's'n'I' ':'n'o'i't'a'z'i'm'i't'p'o' 's'u'n'o'b' 'e'n'o' 'd'n'a' '''' 's'n'o'i't'a'z'i'm'i't'p'o' 'o'w't' 'e's'e'h't' 's'e'o'd' 's'j'Y'n'n'.')'k'r'o'w' 'o't' 'g'n'i'n'n'a'c's' 'e'h't' 'r'o'f'''' 'o't' 't's'i'l' 'd'e'k'n'i'l'-'y'l'b'u'o'd' 'a' 'e'b' 'o't' 'e'v'a'h' 'o't' 'g'n'i'o'g' 's't'I'(''''''''''s't'I' '.'y'l'b'u'o'd''''''''''''t's'i'l' 'd'e'k'n'i'l' 'a' 'h't'i'w' 'y'a'r'r'a' 'e'h't' 'g'n'i'c'a'l'p'e'r'''''''l'p' 'y'b' 't'a'h't' 'o'd' 'n'a'c' 'e'w' ','l'l'e'W''''''''''''''''''y'b' 't'a'h't' 'o'd' 'n'a'c' 'e'W' '.'y'l't'n'e'i'c'i'f'f'e' 't'r'e's'n'i' 'o't' 'd'e'e'n' 'e'w' 'n'e'h'T'n'n'''''''''''''''''''''''''''''''''''''.'e'c'i't'c'a'r'p' 'n'i' 't'a'e'r'g' 's'k'r'o'w' 't'i' 't'u'b' ','y'g'd'o'd' 'f'o' 'd'n'i'k' 's'd'n'u'o's' 's'i'h'T' '''' '.'''''''''''''''''''i'f' 'o't' 'e'r'e'h't' 'm'o'r'f' 's'd'r'a'w'k'c'a'b' 'r'o' 'd'r'a'w'r'o'f' 't'i'b' 'a' 'n'a'c's' 't's'u'j' 'd'n'a' '''l'o's' 'n'a'c' 'e'W't'o'b' 'x'i'f' 'n'a'c' 'e'W'n''n'''L'n''n''t'c'a'r'a'h'c' 'n' 'g'n'i't'r'e's'n'I''''''''''''.')'2'^''''%'n'('O' 's't'I' 'e'''u'r't' 'y'l'l'a'u't'c'a' 's't'a'h't' 'f'i' 's'w'o'n'k' 'o'h'w' 'd'n'a' ',''t'r'a'p' 's'i'h'T''''' 's't'I''''f'o'O' '' '''.'d'r'a'w'r'o'f' 'e'c'a'p's' 'e'c'n'o' 'l'g'n'i's'' 'd'n'A'n'n'!'s'e'k'i'Y' '!'n'o'i't'i's'o'p' 't'r'e's'n'i' 'e'h't' 'd'n'i'f' 'o't' 's'm'e't'i''''''''''' '0'0'0' '0'6' 't'u'o'b'a' 'n'a'c's' 'o't' 'e'v'a'h' 'y'l'b'a'b'o'r'p' 'l'l'''e'w' ','0'0'0' '0'5' 'n'o'i't'i's'o'p' 't'a' 't'r'e's'n'i' 'y'e'h't' 'f'I'''''''''''''''' 'o't' 'g'n'i'o'g' 's't'a'h'T'n'n'.'t'n'e'r'a'p' 's't'i' 'e'm'a'n' 'o't' 'y'b'r'a'e'n' 's't'a'h'w' 'e'e's''''l'''''''''' 's't'i' 't'a'h'w' 'd'n'a' ','s'e'o'g' 'm'e't'i' 'w'e'n' 'e'h't' 'e'r'e'h'w' 't'u'o' 'e'r'u'g'i'f' 'o't' ')'s'm'e't'i' 'd'e't'e'l'e'd' 'g'n'i'p'p'i'k's'(' ''''''''n'i'f' 'o't' 't'n'e'm'u'c'o'd' 'e'h't' 'h'g'u'o'r'h't' 'n'a'c's' 'o't' 'd'e'e'n' 'l'l'''e'W' '''' '?'t'a'h't' 's'i' 'h't'r'a'e' 'n'o' 'e'r'e'h'W''''''''''''''''''''''''''''''''.''''''' ','''''''''''''''''' 'g'n'i'd''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''e'w' '''''''n '''.'.'.' ','''''''''''d'e'e'n' ''t'u'b' 'e'v'o'b'a' 's'i'h't' 'n'o'i't'n'e'm' 't'''n'd'i'd' 'I'''''''''''''''''''''e'v'o'b'a' 'e'k'i'l'n'u' 'd'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'''.'n'i' 'm'e't'i''''s'e'o''''''g'n'i's'u' ''d'''''' ',''''' 'w'e'n'''''s'e'o'd' 'e'h't' '''''''''i' 'e'c'i'l'p's' 'd'n'a' 't's'i'l' 'e''''''''''''''''s'i'l'e' 'h''''''''''''n'e'e'b' 't'''n'e'v'a'h''t' 'n'i' 't'n'e'r'a'p' 't'a'h't' 'd'n'i'f' 'o't' 'd'e'e'n' 'e'w' ','t'r'e's'n'i' 'e'w' 'n'e'h'w' 'n'e'h't' 'd'n'A' ''''n'n''''.'e'b' 'd'l'u'o'h's' 't'n'e'r'a'p' 's't'i' 't'a'h'w' 't'u'o' 'e'r'u'g'i'f''*''''*'''''''''.'w'o'l's' ')'n'('O' ''''''''''''''''''''''''''''''''''' 'm'e't'i' 'e'h't' 'm'o'r'f' 'D'I' 't'n'e'r'a'p' 's't'i' 'y'p'o'c''''''''''''''''''''''p' 's't'i' 't'a'h'w' 't'u'o' 'e'r'u'g'i'f'''''''''''''''''''''t'n'e'r'a'p' 's't'i' 't'a'h'w' 'w'o'n'k' 'o't' 'd'e'e'n' 'e'''''','l'l'e'W'w' 't'a'h't' 'r'o'f' 'd'n'a' '-' 'm'e't'i' 'w'e'n' 'a' 'e't''V'a'e''''''' 'y'l'l'a'e'''''''''''''''''''''''''''''''''take about as many steps''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''x'i'f' 'x'i'f' 'y'x'i'F' '#'#'#'#'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''simplest''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'r'e'v''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h'w''''''''''''''''g'n'i'h't'e'm'o's' 'd'e'p'y't' 'r'i'a'p' ')'n'o'i't'i's'o'p' ','x'e'd'n'i'('''''''''''''''''i's'o'p' 'd'n'a' 'x'e'd'n'i' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'k'c'a'r't' 't's'u'j' 'n'a'c' 'e'w' 'n'o'i't'i's'''''''t'i'o'p' 'r'o's'''''''r'o'r'u'c'''''''t'r'e's'n'i' 'd'l'o' 'e'h't' 'o't' 'e's'o'l'c' 't'r'e's'n'i' 'y'e'h't' 'f'i' ',''''''''''e'w' 'n'i'a'g'a' 't'r'e's'n'i' 'y'e'h't' 'n'e'h'w' 'd'''''''''' 'd'a'n'a' ','d'e't'r'e's'n'i' 'r'e's'u' 'e'h't' 'n'o'i't'a'c'o'l'''''''''l' '''''''d'e't'r'e's'n'i' 't's'a'l' 'e'h't' 'e'h'c'a'c' 'n'a'c' 'e'W' '''''M' '.'h'c'u'm' 't'a'h't' 't'n'e'm'u'c'o'd' 'e'h't' 'd'n'u'o'r'a' 'e'v'o'm' 'y'l'l'a'u't'c'a' 't'''n'o'd' 'y'e'h't' ','g'n'i'p'y't' 's'i' 'n'a'm'u'h' 'a' 'n'e'h'w' 'y'l'l'a'u's'U''''''''''''''''''''''''d'e't'r'e's'n'i' 'e'r'a' 's'm'e't'i' 'n'e'h'W''''''''''m'e't'i' 'n'h'e'W'''''''''''''''''' 'n'a' 'd'n'i'f' 'o'T' ': Replacing the array with a linked list.nnThis has a few benefits:nn-'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''-''' '-'n'n':'s't'i'f'e'n'e'b' 'w'e'f' 'a' 's'a'h' 's'i'h'T'n'n'.'t's'i'l' 'd'e'k'n'i'l' 'a' 'h't'i'w' 'y'a'r'r'a' 'e'h't' 'g'n'i'c'a'l'p'e'R' ':'t's'e'l'p'm'i's''''''''s'u'o'i'v'b'o' 'e'h't' 'h't'i'w' 't'r'a't's' 's't'e'l' 't'u'b' ','s'i'h't' 'o't' 's'n'o'i't'u'l'o's' 'w'e'f' 'a' 's'''e'r'e'''''''i'e'h'T'''''''' 's'j'Y'n'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'r'e'w'o'l's' 'g'n'i't't'e'g' 'd'n'a' 'w'o'l's' 's't'I' '.'w'o'l's' 't's'u'j' 't'''n's'i' 's'i'h'T'''''''''''n'o'l' 'e'h't' 'o'S' '.''''''''''' 'e's'u'a'c'e'b''''s'(' 't'n'e'm'u'c'o'd' 'e'h't' 'n'i' '*'n'e'e'b' 'r'e'v'e'*' 'e'v'a'h' 'h'c'i'h'w' 's'r'e't'c'a'r'a'h'c' ','l'l'e'W' '.'t'n'e'm'u'c'o'd' 'e'h't' 'n'i' 's'r'e't'c'a'r'a'h'c''''i' 'e'r'a' 'e'r'e'h't' 's'a' '''''p'o'o'l'''''''''''''''''''''''''' 's'p'e't's' 'y'n'a'm'''''' 'y'n'm'a' 's'a' 't'u'o'b''''s'a' 'e'k'a't' 'o't' 'd'e'e'n' 'e'w' ','t'r'e's'n'i' 'e'w' 'e'm'i't' 'h'c'a'E'''''''''''''e'm'i't' 'h'c'a'e' 'o'S''r''r'c' 't's'r'i'f'''''''''''t'u'o' 'e'r'u'g'i'f' 'o't' 'd'e'e'n' 'e'W' ''a' ','h'O' '''''''''''e'r'''e'w''''g'n'i''' 'd'n'A'm'''''s'i'h''''''''''s'h'i't'e't'.''''''''''''''''''' 's'i'h't'''''''''o't' 'x'e'd'n'i' 'e''''i'h't'''o't' 'd'''''''''' 'e'h't' 'y'p'o'c'e'e'n' 'e'W'''''i'':'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'h't' 'd'n'a' ','t'i' 'n'i' 's'm'e't'i' '0'0'0' ''''0'0'0'1' 's'a'h''0' '' 't'n'e'm'u'c'o'd' 'e'h't' 'e'n'i'g'a'm'i' 's't'e'L'n'''''':'s'i'h't'''' { item: 'X'''''''''''''''''' ','e's'l'a'f' ':'d''''D'e't'e'l'e'D's'i'', '''''''''' 'd'e'e'n' 'e'w'''''''''''''''''''''''''''''''''''''')'!'m'e't'i' 'g'n'i'd'e'e'c'e'r'p' 'e'h't' 'f'o' 'd'i' 'e'h't' ''''''''''''''''''''' 'h't'i'w' 's'i'h't' 's't'n'e'm'e'''l'p'm'i''s't''''''''''' 'h't'i'w' 's'i'h't''''''''''h't' 'i'('''''''o'(' ''''''d'n'W''a''''''''''''' ' ''t'0''s'i'l' 'e'h't' 'n'i' ','id, seq, parent: ['seph', 0]' ' ',''' '0'}'e','s'n'l'''a' 'f''' 'e':'''d'k'i'''l'D'''e' 't''' '0'''''e' ''u'r't'''e','l'''' 'e'''0' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''The''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''doc.content.splice'destIdx''''''0'0'0'''''''''''''''' ''''''''''''''''''''''''e'm'l'p'm'i' 's'i''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'''''''''''''''''''g'n'i'm'u'''''''''' 'y'l'l'a'u't'c'a's's'a' 's'i'''' 's't'i'' 's'i'h'T'w'o'l's' 'o's'l'a' 's'i' 's'i'h'T' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''-' ''''''''''''''''''''''')'!'x'e'l'p'm'o'c' 's'i' '8'v' '-' 's'e'o'd' 'y'l'l'a'u't'c'a' 't'i' 't'a'h'w' 's'w'o'n'k' 'o'h'W' '.'s't's'i'l' 'r'o'f' 'y'l'l'a'n'r'e't'n'i'''''''''''''''''' '.'s't's'i'l' 'r'o'f' 'y'a'r'r'a' 'n'a' 's'e's'u' 't'p'i'r'c's'a'v'a'j' 'f'i' ','l'l'e'W'(' '.'e'c'a'p's' 'e'n'o' 'y'b' 'd'r'a'w'r'o'f' '0'0'0' '0'6' 'n'o'i't'i's'o'p' 'm'o'r'f' 'm'e't'i' 'y'r'e'v'e' 'e'v'o'm' 'o't' 's'd'e'e'n'''''''''e's'u' 't's'i'l' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'd'e'e'n' ')'y'l'l'a'u't'p'e'c'n'o'c'(' 't'p'i'r'c's'a''''s'v'a'j' ','s'm'e't'i' '0'0'0' ''''''' '0'0'0'1' 's'a'h' 'y'l't'n'e'r'r'u'c' 'y'a'r'r'a' 'e'h't' 'f'I''''''r'e's'n'i' '/'/' '0'6'(destIdx, 0, newItem''''''n'n'`'`'`'n')'n't'p'i'r'c's'a'v'a'j'`'`'`'n'n':'n'i' 't'i' 'e'c'i'l'p's' 'o't' 'd'e'e'n' 'e'w' ','n'o'i't'a'c'o'l' 'w'e'n' 'e'h't' 'd'n'u'o'f' 'e'v'''e'w' 'r'e't'f'a'''''''h't' 'n'''''' 'n'e'h'T'n'n'.'w'o'l's' 'e'b' 'o't' 'g'n'i'o'g' 's'y'a'w'l'a' 's'i' 's'i'h't' 't'u'b' ','n'a'c' 't''''''' 'c'i' 't'a'h'w' 'o'd' 'l'l'i'w' 'r'e'z'i'm'i't'p'o' 's'''t'p'i'r'c's'a'v'a'J''''''''''''''''''''w'o'l's' 'y't't'e'r'p''''l' 's'i' 's'i'h'T' '''',''D''e'''s's'' ''l'i'''a'f'o'f'' ''''''''''''''''''''''''''''''''''''''''''''''''''''''My implementation does a linear scan through the document to find this location.'''''''''''''''y'a's' 'o't' 's'i'''''''''''''''e's'u' 'I' ','s'n'a'e'm' 'h'c'i'h'W''I' That sounds fancy - its a `for()` loop. We count all the not-deleted items until we've counted past 5000 items which aren't deleted and ret'''''''''''' 'n'o'i't'a'n'i't's'''e'd'urn t''h''e resulting index. If 1000 characters have been deleted before position 5000, the index position might be 6000. Unfortunately for us, this is'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''`'''''''`'s't'i' 't'u'b' '-' 'y'c'n'a'f' 's'd'n'u'o's' 't'a'h'T' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'g'n''''''''''''''''''''s'r'e't'c'a'r'a'h'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'i' 's'i'h't' ','s'u' 'r'o'f' 'y'l'e't'a'n'u't'r'o'f'n'U''''''''''r'o'f'n'u' 't'u'B' '''''''''''''.'0'0'0'6' 'e'b' 't'h'g'i'm' 'n'o'i't'i's'o'p' 'x'e'd'n'i' 'e'h't' ','0'0'0'5' 'n'o'i't'i's'o'p' 'e'r'o'f'e'b' 'c''''''''''''''''''''''''d'e't'e'l'e'd' 'n'e'e'b' 'e'v'a'h' 's'm'e't'i' '0'0'0'1' 'f'I' '.''''''''''''''''''''i'b' 'e'b' 'l'l'i'w' 'h'c'i'h'w' '-' ''''''''''''''''''''''0'0'0''''5'5'5' 'g'E'(''''E' '.'''''''''''''g'e'(' ''i't'l'u's'e'r''''''''' 'x'e'd'n'i' 'e'h't' 'n'r'u't'e'r' 'd'n'a' 'd'e't'e'l'e'd' 't'''n'e'r'a' 'h'c'i'h'w' 's'm'e't'i' '0'0'0'5'''''''0'1' 't's'a'p' 'd'e't'n'u'o'c' 'e'v'''e'w''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'l'i't'n'u' 's'm'e't'i' 'd'e't'e'l'e'd'-'t'o'n' 'e'h't' 'l'l'a' 't'n'u'o'c' 'e'W'''''''''' 'e'w' '.'p'o'o'l' ')'('r'o'f' 'a' 's't'I' '.'n'o'i't'a'c'o'l' 's'i'h't' 'd'n'i'f' 'o't' 't'n'e'm'u'c'o'd' 'e'h't' 'h'g'u'o'r'h't' 'n'a'c's' 'r'a'e'n'i'l' 'a' 's'e'o'd' 'n'o'i't'a't'n'e'm'e'l'p'm'i'''''''''''t'a't'n'e'm'e'l'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''y'l'''''''''''n''''''m'i' 'y'M'i' 'd'e'c'i'l'p's'l'a'u't'c'a' '''''''''''''d'e't'r'e's'n'i' 'e'b' 'l'l'i'w' 'm'e't'i' 'w'e'n' 'e'h't' 'e'r'e'h'w' 'n'e'h't' 'd'n'a' '-'n'e'b' 'd'l'u'o'h's' 't'n'e'r'a'p' 's'''m'e't'i' 'w'e'n' 'e'h't''''''''w'e'n' 'r'u'o' 't'a'h'W''''''''''t' 'e'r'e'h'W' '-'n'n':'t'u'o' 'e'r'u'g'i'f' 'n'a'c' 'e'w' 'o's' ','m'e't'i' 't's'i'l' 'a' 'h't'i'w' 'n'o'i't'i's'o'p' 't'a'h't' 'e't'a'l'e'r'r'o'c'' 't''''''''''''''''t'r'e's'n'i' 'o't' 'e'r'e'h'w''''' 'e'h't'''s':''i''d'l' 'a''' '' 's''D'','i' 'e'e'''h'''s't'c'i'l''e''''a'n'l' 'f' {'e'' ' it'D':''em:''d's' 'X'i'''', id''''''''''' ','e'k'i'l' 't'a'''''''''''''''''''''''''' 's'i'h't' ','t'n''''''''''''''''''''e' 'h't' 'n'i' 'm'e't'i' 'h'c'i'h'w' 'e'm'u'c'o'd' 'l'a'e'r' 'a'''''''''''''''''''a'e'r' 'a'r' 'n'i', 'D'seq, 'e'paren't't: [''e'seph''l', 0] 'e'},'h''D'''w' 's'',''''i''u'l'c'n'I'''''''''''''''''''''''''''''''''''''''''''d'e't'e'l'e'd' 'e'r'a' 's'm'e't'i' 'h'c'i'h'w' 's'k'r'a'm''''''''l'e'd' 's'a'h' 'o's'l'a' 't'i' ','h'O''''(' '.''''''w'o'n' ','''''''''''''''''''''''''''''''''''n':'s'i'h't' 'e'k'i'l' 't'n'e'm'u'c'o'd' 'a' 'e'v'a'h' 'e'w' 'o'S'n'''```javascriptnstate = [n { item: 'a', id: ['seph', 0], seq, parent: null },n { item: 'X', id, seq, parent: ['seph', 0] },n { item: 'b', id, seq, parent: ['seph', 0] },n { item: 'c', id, seq, parent: [..] }n]n```'n''n'''So imagine the user types an 'a' in the middle of the document (at position 5000). My reference-crdts implementation needs to find''So imagine the user types an 'a' in the middle of the document (at position 5000)' '''.''''''''''''''''''''''''''''''''''''''''''' 'd'n'i'f' 'o't' 's'd'e'e'n' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '.')''''0'0'0'0'5' 'n'o'i't'i's'o'p' 't'a'(' 't'n'e'm'u'c'o'd' 'e'h't' 'f'o' 'e'l'd'd'i'm' 'e'h't' 'n'i' '''a''' 'n'a' 's'e'p'y't' 'r'e's'u' 'e'h't' 'e'n'i'g'a'm'i' 'o'S'n''n'''''''''''''''''''''.'t'n'e'r'e'f'f'i'd' 's'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'e'h't' 'S''Well, some of the performance improvements might also come from the''''' 'o's'l'a' fact I'm n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''My reference-crdts implementation''''''''''''''''''''''''''''''''''' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 's't'd'r'c''''C'-'e'c'n'e'r'e'f'e'r' 'y'M'''''' 's'i'h'T'n'n'.'t'r'e's'n'i' 'o't' 'n'o'i't'a'c'o'l' 'e'h't' '''''''h't'g'n'i'd'n'i'F' ':'e'c'n'a'm'r'o'f'r'e'p' 'n'i' 't'o'p's't'o'h' 'w'e'n' 'a' 'e'v'a'h' 'e'w' ','n'o'i't'a't'n'e'm'e'l'p'm'i' 'r'u'o' 'n'i' 'm'h't'i'r'o'g'l'a' 't'h'g'i'r' 'e'h't' 'g'n'i's'u' 'e'r''''''''''''''''o'g' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''b'o'r'p' 'g'i'b' 'r'e'h't'o'n'a' 's'''e'r'e'h't' ','e'r'u't'c'u'r't's' 'a't'a'd''''m'e's' 'r'u'o' 'd'e'k'c'i'p' 'd'n'a' 's'n'o'i't'a'z'i'm'i't'p'o' 'o'r'c'a'm' 'e'h't' 'd'e'r'e'v'o'c' 'e'v'''e'w' 'w'o'N'n'n'''''''''''''''n'i'w' 'e'h't' 'r'o'f' 's'n'o'i't'a'z'i'm'i't'p'o' 'o'r'c'i'M' ''''''' '#'#'#'#'n'''n'n'''''''''''t'u'B' '.'ot using i'''''e'r'e'h' 'mmutablejs''''''''''''''' 'f'o' 'e'm'o's'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'j'e'l'b'a't'u'm'm'i''''''''''''e'g'r'e'm'o't'u'a' 'g'n'i's'u' 't'o'n' 'm'''I' 't'c'a'f' 'e'h't' 'm'o'r'f' 'e'm'o'c' 'o's'l'a' 't'h'g'i'm' 's'''''''''''''''''t'n'e'm'e'v'o'r'p'm'i' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h't'''t'i' ','l'l'e'W'','e'm'a's' 'e'h't' 'e'r'a' 's'c'i't'n'a'm'e's' 'e'h'T' ''''''''''''''''''''''''''''''''''''''''''n'o'i't'c'n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''3''''''''''','''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''o'y''''S' '.'''''''''''''''''''''''''''''''''''''''''''''''''t's'i'l' '!''a' 'h't'i'w' 'T'D'R'C' 't's'i'l' 'a' 't'n'e'm'e'l'p'm'I'''''''''''''s'u'o'i'v'b'o' 'd''''''''''''''''''''''''''''''''''''''.'e'r'e'h' 't'a'h't' 'g'n'i''''''' 'e'r'u's'a'e'm' 't'o'n' 'm'''I' 'h'g'u'o'h't' ',''''''R'C' 'n'a' ''''''''''''''''''''''''''''''''''''''''''!'s'u'i'n'e'G' '?'t's'i'l' 'a' 't'n'e'm'e'l'p'm'i' 'o't' 't's'i'l' 'a' 'e's'U' '!'t'a'e'n' 's't'I' '.'4''''''n' 'd'n'a' ','e'c'i't'c'a'r'p' 'n'i' 'e'r'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s''''''''''''''y'l'l''''''''''''e'c'i't'c'a'r'p' 'n'i' ''a'e'r' '''''s't'i' 'o'S''''I''''''''''''''''''''!'t's'a'f' 't'i' 's'e'k'a'm' 's'i'h'T' ''n'u'r'''''''''''''''.'g'n'i'h't'y'n'a' 's'e'o'd''l' 'r'e'v'e'n' 't's'o'm'l'a' 's'i''''''''x'e' 's't'e'g' 'p'o'o'l' 'e'h't'''''''''''t's'o'm'l'a' 's't'i' ','p'o'o'l' ')'e'm'i't' 'r'a'e'n'i'l'(' 'a' 's'a'h' 'm'h't'i'r'o'g'l'a' 's'i'h't' 'h'g'u'o'h't'l'A' 'a'r' 'r'e'p'u's' 'e'r'a' 'n'o'i't'a'c'o'l' 'e'm'a's' 'e'h't' 'n'i''''''''''''e'm'a's' 'e'h' 't'n'i' 's't'r'e's'n'i' 't'n'e'r'r'u'c'n'o'C'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'m'e't'i' 't'n'e'r'a'p' 'e'h't' 'r'''''''t' 'e't'f'a' 't'h'g'i'r'''''''' 'e'h't' '''''''t'h't'a' 't'r'e's'n'i' 't's'u'j' 's'y'a'w'l'a' 't's'o'm'l'a' 'u'o'Y'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e't'a'r'e't'i' 'o't' 'e'v'a'h' 't'''n'o'd' 'u'o'y' ','n'o'i't'a'c'o'l' 't'''''''''''''o'l't' 'a'h't' 'n'i' 's't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'o'n' 'e'r'a' 'e'r'e'h't' 'n'e'h'W' '.'2'''''''''' '.'3'n''''''''''''''''''''''''''''''''''''''''''''''''''https://github.com/josephg/reference-crdt''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''')'e't'a'r'''2.'''''''''''''''''''''''''''''''''''''''''''''''''''''''s''''''''h'c'a'o'r'p'p'a''i'h't' ''','t'n'''','e'r'e'f'f'i'd' 'y'r''''''''''''''''' 'r'e't's'a'f'''''''''''''''''''''r'''''''''''''''''''''''''''''''''''''.''''| ------------------------''''''' ' ' ' ' ' ' '-- | ---------- |'''| automerge @ 1.0.' '0' '-' 'p' 'r' 'e' 'v' 'iew2 | 291s 'n| -----'''' ' '-' '''---' '---' '---' '---' '---' '---' '-- | ------'''' ' '---- |' ''|n'n''''''''''''''''.'r'e'l'l'a'''''''' ' ' ' ' ' ' 'm's' 'd'n'a''n| automerge @ 1.0.0-preview2 | 291s |' '''t'''n'e'i'c'i'f'f'e'-'y'r'o'm'e'm'''''''m'e' 'e'r'o'm' 'h'c'u'm' 'o's'l'a' 's't'I' ''e't's'a'f''''''''''h'c'a'o'r'p'p'a' 's'i'h't' 's'i' ''''''''''''''''''''.'r'e't't'e'b' 'x'0''''0'1' 't'u'o'b'A'''''''k'a't' 't'I' '?'r'e't't'e'b' 'h'c'u'm' 'w'o'H'n'''n| Test ''''''''''' 'e'g'r'e'm'o't'u'a'''' 'M'A''''''''''''''''')'s'j'y' '/' 'e'g'r'e'm'o't'u'a'(''' | Time taken |n| -------'| automerge @ 1.0.0-preview2 | 291s |n''''''''''''''''s''''''''''' '''1' ''3'''''''1'3' ' ' ' ' ' ' ' ' ' ''t'd'r'c'-'e'c'n'e'r'e'f'e'r'------------------- | ---------- |n| automerge @ 1.0.0-preview2 | 291s |n| JS baseline | 0.61s |nn''''''n'n'n''''''-'-'-'n'n'n'n'e'v'''''''i'd' 's'i' 'n'o'i't'a't'n'e'm'''e''''''''''''' 'e'h't' 'e'r'a'''s'i' 'o'S''l'p'm'i' 's'i'h't' 'h'g'u'o'h't' 'n'e'v'E''' This is This is *sem''''''''''''''''''''''''''''''''''''''''''''''t'i' '''''''''''' ''''T'.''''''')'r'e'z'z'u'f' 'a' 'h't'i'w' 'd'e'k'c'e'h'c' 'I'(' '.'e'g'r'e'm'o't'u'a' 'l'a'e'r' 'e'h't' 'o't' 'l'a'c'i't'n'e'd'i'antically* the same''2. This is ''''''''''''''''''''t'n'a'm'e's' 's'i' 's'i'h'T''''''''''''''''''' '.'3'n'r'e't's'a'f' 's't'I' '.'2'n'g'e't'n'i'(' '''''''''''.'n'o'i't'c'n'u'f' 't'r'e's'n'i' 'e'h't' 't'u'o' 'g'n'i'p'p'a'w's' 't's'u'j' 'y'l't's'o'm'''''' 't's'u'j' ',''''''''''''''''' 'e'm'a's' 'e'h't' 'g'n'i's'u' 's'm'h't'i'r'o'g'l'a' 'e's'o'h't' 'f'o' '3' 'l'l'a' 's't'n'e'm'e'l'p'm'i' 't'c'e'j'o'r'p' ')'s'(']'s't'd'r'c'-'e'c'n'e'r'e'f'e'r'[' 'y'M'''''''''''''''''''''''a'h' 't'c'e'j'o'r'p' 'b'u'h't'i'g' 't'a'h'T' '.'e's'a'b'e'd'o'c' 'e'm'a's' 'e'h't' 'n'i' 's'c'i't'n'a'm'e's' 'r'e'h't'o' 'd'''''''''n'a' '9'c'n'y'S' 'd'n'a' 'e'g'r'e'm'o't'u'A' ','s'j'Y''''C' 't'n'e'm'e'l'p'm'i' 'n'a'c' 'u'o'Y' '.'1'n'n':'h'c'a'o'r'p'p'a' 's'i'h't' 't'u'o'b'a' 's'g'n'i'h't' 'l'u'f'i't'u'a'e'b' 'w'e'f' 'a' 's'''e'r'e'h'T''''''''''''''''''''g'n'i'h't' 'l'u'f'i't'u''''''''''i't'u'a'e'b' 'e'h'T'n'n'u''''''''''*''''''''''''*''''''''''''e'm'a's' 'e'h't' 'y'l'l'a'c'i't'n'a'm'e's' 's'i'''''''m'e'l'p'm'i' 's'i'h'T'f' ''''''''''.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'e'm' 'f'o' 's's'o'b' 'e'h't' 't'o'n' 'e'r'''u'o'Y' '.'t'i' 'e'k'i'l' 'l'e'e'f' 'I' 'f'i' '''''''''''''''''''''m'o'c''''''''v' 'e'b' 'o't' 't'n'a'w' 'u'o'y' 'f'i' '''' 's'e'n'i'l' '0'5' 'r'O''''n'o'i't'r'e's'n'i''''''''''''''''''' 'n'i' 'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''m'h't'i'r'o'g'l'a' 'e'l'o'h'w' 'e'h't' 'e't'i'r'w' 'n'a'c' 'u'o'Y'''''''''''''''''''''''g'n'i't'r'e's'n'i' 'y'l'l'a'u't'c'a' 'e'r'''e'w' 'e'r'e'h''This code sounds complex, but it ends up being about 20 lines of code, [written in long form here](https://github.com/josephg/reference-crdts/blob/fed747255df9d457e11f36575de555b39f07e909/crdts.ts#L401-L459).'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''['''''''''''''''''''''''''''https://github.com/josephg/reference-crdts/blob/fed747255df9d457e11f36575de555b39f07e909/crdts.ts#L401-L45''''''''''''''e'd'o'c' 's'i'h'T' '.')'9'(']'e'r'e'h' '''']'''m'r'o'f' 'g'n'o'l' 'n'i''''''' 'g'n'i's'u' 'n'e't't'i'r'w'''''''i'r' ','e'd'o'c' 'f'o' 's'e'n'i'l' '0'2' 't'u'o'b'a' 'g'n'i'e'b' 'p'u' 's'd'n'e' 't'i''''s't'i' 't'u'b' ','x'e'l'p'm'o'c' 's'd'n'u'o's' 'e'd'o'c' 's'i'h'T'n''w' the positional insert location'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'o'i't'a'c'o'l' 't'r'e's'n'i' 'l'a'n'o'i't'i's'o'p'''n'i' 'e'h't' 't'u'o' 'e'r'u'g'i'f' 'o't' 'e'e'r't' 'e'h't' 'p'u' 'k'l'a'W' ''''W'.'3'n's'n'I'''''''o't'n'i' '''''''''''''''''''''n'e'r'd'l'i'h'c' 'f'o' 't's'i'l''''''''''''''''.'1'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'e'r't' '''''''''''h't'i'w' 'n'o'i't'a'''s'''''''e'g'r'e'm'o't'u'A' 'e'c'a'l'p'e'r' 'o't' 'g'n'i'o'g' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'''''''y'c'n'a'f' 'a''n''''n'n'n'n''i't'n'e'm'e'l'p'm'i'''''''''''''''''''''''''.'t'r'o's' 'n'o'i't'r'e's'n'i' 'n'a' 'g'n'i'o'd' 'e'r'''e'w' 'y'l'l'a'c'i's'a'B'n'n'e'r'e'h't' 't'i' '''s''''''g'n'i'p'' '''''''''''''''''''''''''''''''''''''''''''''''''t'r'e's'n'I' '.'3'n'm'e't'i' 'w'e'n' 'e'h't''''t' 'e'r'o'f'e'b' 'e'm'o'c'''''''m'o' 'd'l'u'o'h's' 'h'c''''''' 'h'i'h'w' ','t's'i'l' 'e'h't' 'h'g'u'o'r'h't' 'e't'a'r'e't'I''''''''''''''''s'm'e't'i' 'r'e'v'o' 'p'i'k'S'''''' 'n'a'c'S' '.'2'n'm'e't'i' 't'n'e'r'a'p' 'e'h't' 'd'n'i'F' '.'1'n'n':'s't'i' ''''''''''''''''''''''''''''''''''''''''''''''h'c'a'o'r'p'p'a' 't's'i'l' 'e'h't' 'h't'i''''t'W'n'n't'o'p's' 't'h'g'i'r'''''''p'o'r'p'p'a' 'e'h't' 'n'i' 'n'e'r'd'l'i'h'c' '''s't'n'e'r'a'p' 'e'h't' 'o't' 'm'e't'i' 'w'e'n' 'e'h't' 'd'd'A'''''d'n'i'F''''d'd'A' '.'2'n'm'e't'i' 't'n'e'r'a'p' 'e'h''''''''t' 'd'n'i'F' '-'n'n':'s'i' 'r'e'w''''e's'n'a' 'e'h't' 'e'g'r'e'm'o't'u'a' 'h't'i'W' '?'s'i'h't' 'e'k'i'l' 't's'i'l' 'a' 'o't'n'i' 'm'e't'i' 'w'e'n' 'a' 't'r'e's'n'i' 'u'o'y' 'o'd' 'w'o'h' ','s'i' 'n'o'i't's'e'u'q' 'e'h'T''''[' ':' 'h'c'i'h'w' ''''''l'l'u'n' '''''''''''']'0' ','''h'p'e's'''[':'',''''''''': ['seph', 0]'''''''''''''''''''''''''''l'l'u''''''']'.'.'[' ''''''''''' 'y'''l'l'a'u't'c'A'('''''''''''''''''''''''''''''''''''''''''''''''t'I' '.'y'l'''''''''''''''''''''''''''''''''''''y'l't'h'g'i'l's' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n')'!'''''''''''''''''''''''''''''''''''.'d'a'e'h'a' 'g'n'i'p'm'u'j' 'e'r'''e'w' 't'u'b' ','y'a'r'r'a' 'n'a' 'f'o' 'd'a'e't's'n'i' ''''''' ','t's'i'l' 'd'e'k'n'i'l' 'a' 's'e's'u' 't'i' 'd'n'A''''''t'u'B' '.'''''''''t'h'g'i'l's''''b' ',''''''''''''''''''''A'G'R' 'n'a'h't' '')'s'c'i't'n'a'm'e's' 't'n'e'r'e'f'f'i'd' 's'a'h' 't'i''''d' 'o's'(' 'T'D'R'C' 't'n'e'r'e'f'f'i'd' 'a'''''''g'l't'n'e'r'e'f'f'i'd' 's'g'n'i'h't' 'w'e'f' 'a' 's'e'o'd' 'y'l'l'a'u't'c'a' ''''''''''''''''''''''''t'n'e'r'e'f'f'i'd' 'a' 's't'n'e'm'e'l'p'm'i' 's'j'Y'n''''''''''''''.'.'.' ':'n' ':'''''''''''''''''''''''''''''b' ','s'i'h't' 'd'e't'n'e'v'n'i' 'I' 'm'i'a'l'c' 'd'l'u'o'c' 'I' 'h's'i'w' 'I' '.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 's'j'Y' '.'s'j'Y' '-' 'n'o'i't'a't'n'e'm'e'l'p'm'i' 'T'D'R'C' 'e't'i'r'o'v'a'f' 'y''''''' 't'm''''''' '-' 's'j'Y' 'm'o'r'f' 'l'a'e't's' 'n'a'c' 'e'w' 'h'c'i'h'w' 's'T'D'R'C' 't'n'e'm'e'l'p'm'i' 'o't'L'g'n'i'z'i'm'i't'p'o' 't'n'i'o'p' 'o'n' 's'''e'r'e'h't''''''''''r'c'i'm'm' 'e'h't' 'e'c'n'i's' ',''t'i''b' 'o't' 's'n'i'w' 'e'c'n'a'm'r'o'f'r'e'p' 'f'o' 's't'o'l' 's'''e'r'e'h'T' '':'g'n'i'n'u't' 'e'c'n'a'm'r'o''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s't'i' 's'i' 'm'e'l'b'o'r'p' 't's'e'g''''''''''''''''''''' 'y'a'w' 'r'e't't'e'b' 'a' 's'''e'''''''''''''a' 's'''r'e'h'T'''''t''' 'o'S''g'i'b' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'p'i'r'c's'a'v'a'j'''''''''''''''''''''0' ',''''0' ':'''h'p'e's'''']'['''''''}'{''''''']'.'.'[' ':' ':'''''''''''''''''''''''''''''''']'.'.'[' ':'''''''''X''''''''''' '''''''''']'.'.'[' ':''''''',''''''''''''''''''''e'k'i'l' ''''''''''''''''e'k'i' 'l'g'n'i'h't'e'm'o's' 'n { item: 'b', id, ''''''''''''''''''''''''''''',''''''''''''''''''''':''```javas','criptnstate ='[''' {n { item: ',''a', id,''''''''}' '' ''''''' ''','':'t'n'''''e'r'a'p''children'' '':'}' ' '['''''''''''t'' ' ''':'n't'''' 'n'e'e'''}''r'''' 'r'a''a'''p' seq'', c'' 'p'h':''}'ild't' ''ren'n': ''['e'n 'r''' {'a'' ' item':': 'X''t', id,'n' seq,'e' chil'r''p'dr'a'en: []},n { item: 'b', id, seq, chi'p'ldren: [n { item: 'c', id, seq, children: []}n ]}']'''n ]}n}n```n't's'i'l' 't'a'l'f' 'e'l'g'n'i's' 'a' 'n'i' 's'm'e't'i' 'e'h't' 'l'l'a' 't'u'p' 'l'l'''e'W'n'n'seq, children: [''n { item: 'c', id, seq, children: []}'''''''''''''''''''' { item: 'a', id, seq, children: [' { item: 'b', id, seq, children: [' { item: 'c', id, seq, children: '''' '}'''')']'n '}''[ ]'n'n'' '' '' ''c''''''''b''''''''''''''' ]''''''' ','q'e's''''' '}']''n 'n ' '[' '' ','d'i'''''''''':'n'e'r'd'l'i'h'c' ','''a''' ':'m'e't'i' ''''''n '' ''''i'{' '''''}''n 'n ' '{' '=' 'e't'a't's''''''`'`'`'n'n'n'`'`'`'n'n':'f'o' 'd'a'e't's'n'i' 'o'S' '.'t's'i'l' 'a' 'h't'i'w' 'e'e'r't' 's'''e'g'r'e'm'o't'u'a''''''''r'e'm'o't'u'A' 'g'n'i'c'a'l'p'e'r' 's'i' 'e'r'e'h' 'e'k'a'm' 'l'l'''e'w' '''''''''''''''' 'e'r'a' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'x'e'l'p'm'o'C' '''''''''''''''''''e'g'n'a'h'c' 't's'r'i'f' 'e'h'T'''''''''''''''''''' 'r'e't't'e'b' 'a' 's'''e'r'e'h'T''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''T'D'R'C' ')'r'e't't'e'b' 'h'c'u'm'(' 'r'e'h't'o'n'a''''''''''(' 'r'e't'h'o'n'''''''(' '''' 'a' 'e't'o'r'w' 'o'h'w' '-' 's'n'h'a'J' 'n'i'v'e'K' '.'t'h'g'i's'n'i' 's'i'h't' 'r'o'f' 't'i'd'e'r'c' 'e'k'a't' 'd'l'u'o'c' 'I' 'h's'i'w' 'I'n'n'.'e'r'u't'c'u'r't's' 'a't'a'd' 'd'e's'a'b' 'e'e'r't' 'x'e'l'p'm'o'c' 's'''e'g'r'e'm'o't'u'a''''''''''e'g'r'e'm'o't'u'A' 's'i' 'm'e'l'b'o'r'p' 't's'e'g'g'i'b' 'e'h't' ','e's'a'c' 's'i'h't' 'n'i' 'd'n'A''''''' 'n'i' 's'A' '.'s'n'o'i't'a'z'i'm'i't'p'o' 'o'r'c'a'm' 'h't'i'w' 't'r'a't's' 'o't' 'e'v'a'h' 's'y'a'w'l'a' 'e'w''''''''''''''''''''''''''s'a'h' 's'y'a'w'l'a' 'p'e't's' 't's'r'i'f' 'e'h't' 'g'n'i'h't' 'f'o' 't'r'o's' 's'i'h't' 'h't'i'W''''i'''''''''''''''''''t'n'a't'r'o'p'm'i' 't's'o'm' 'e'h'T''''n''n''''n'n'n'n'f'r'e'p' 'h't'i'w' 'g'n'i'y'a's' 'd'l'o' 'n'a' 's'''e'r'e'h'T''''''''''''''''''''''''''''''''''''''g'n'i'n'u''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'n'i'm' 'n'i' 'e'c'n'a'm'r'o'f'r'e'p' 'h't'i''''''''''''' 'h'i't'w' 'n'e't't'i'r'w' 'r'e'v'e'n' 't's'u'j' 's'a'w' 't'i' ','y'l'l'a'e'R'n'n't' 'e'c'n'a'm'r'o'f'r'e'p' 'h't'i'w' 'y'h'p'o's'o'l'i'h'p' 'y'M''''''p' 'e'h'T'''''''''r'e'v'e'n'e'h'W''''''''e'v'e'n'e'h'w'n'n'''''''''''''''''''''''''''''''''There's an old saying with performance tuning:nn> You can't make a program faster. You can only make it do less work.'''''''''''''''''''''''''''''''''''''''''''''''''''n''''''''''''''''''''''''' 'k'o'o'l' 'a' 'e'k'a'T' ':'''':'A' 't'i'b'i'h'x'E''''T''?'e'r'e'h' 'k'r'o'w' 's's'e'l''''''''''''''''' 'f'o' 'k'r'o'w' 'e'h't' 'l'l'a' 'o'd''''c'''''''''''''l' 'o'd''''''''''*' 'o'd'*' 'r'e't'u'p'm'o'c' 'e'h't' 'e'k'a'm' 'e'w' 'o'd' 'w'o'h'''''''n'a'w' 'e'w' 'o'S'n'''nn'n'''''''' 'f'o' 'l'u'f'd'n'a'h' 'a'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'r'e'h'T''n'n''''''''''''''j'''''''''''''''''''''' 'e't'i'r'w'-'n'o'-'y'p'o'c''''''''''''''''''''''''''''''''''''''''''''''''''''''o't' 's'e'l'g'g'u'r't's''''''''''''V'''''' '8''''''C'G' '&' ''''''s'e's'u' 'v'''''''''''''''''''''''''''''''''''''''''t't''''u'b' ','s'i' 't'i' 't'o'h' 'w'o'h' 'w'o'n'k' 't'''n'o'd' 'I' '''''''''''''*''''''''''''''*''''''''''''''''''''''''''' 'g'n'o'r'w' 'e'h''''''''''''''''''''''''''''!'n'o'o's' 's'i'h't' 't'u'o'b'a' 'k'l'a't' 'l'l'''e'w' ''t' 's'k'c'i'p'''''''''''''''''''''''''''''''''''''''''''''''''''''o't' '''''''''g'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'i' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 't's'r'i'f' 'd'n'a'''''''' 'e'r'o'c'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'s'i'h't' 'o'd' 'o't' 'y'a'w' 'r'e't't'e'b' 'a' 's'''e'r'e'h't' 't'u'b' ','s't's'i'l' 'd'e't's'e'n' 'f'o' 'h'c'n'u'b' 'a' 'e'r'o't's' 'o't' 's'm'e'e's' 'e'g'r'e'm'o't'u'A'''''''''''''e'g'r'e'm'o't'u'a' 'n'I''''''''''''''' '.'e'r'u't'c'u'''''''u'c''''u'r't's' 'a't'a'd' '&' '''''''''''''''''''''''''''''''''''''''''''h'T' '.'m'h't'i'r'o'g'l'a' 'e'h't' 's'i' 'x'''''''i' 'i'f' 'o't' 'g'n'i'h't' 't's'e'g'''' 'g'i'b' 'e'h'T' '.'n'o'i't'c'a'r't's'i'd' 'g'i'b' 'a' 'l'l'a' 's'i' 's'i'h't'''''''''''l'a''''''''''''''''''''''''''''a' 'e'h't' 's'i' 'e'r'e'h' 'x'i'f' 'o't' 'g'n'i'h't' 'e'r' 'e'h't' 't'u'B''''''''''t's'r'i'f' 'e'h'T''''''''''''''''''''''''''''''''''''''''''''''''o's''''d'a'e'r' 'l'a'e'r' 'e'h'T' '.'g'n'i's's'e'r'd' 'w'o'd'n'i'w' 's'i' 's'i'h't' 'l'l'a' 't'u'B'''''''''' 'e'k'a'm' 'r'o'''''T'''''t''' 'f'I'''''''' 'a''''''''''''''''''''''''''''''''''.'Y'''''''''''''''d'e't'r'o's' 'y'd'''a'e'r'l''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''`'''''''''''''''''''''''''''n'e'h't' '''''''''''''''''''''''n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'a'h't' 's'i' 'w'o'l's' 's'i' 'e'g'r'e'm'o't'u'''''''u't'a' 'n'o's'a'e'r' 't's'e'g'g'i'b' 'e'h'T'''''''''''''''''''''''''''n'o's'a'e'r' 'r'e'g'g'i'b' 'h'c'u'm' 'e'h't' 't'u'B'''n'n's'e'r'u't'c'u'r't's' 'a't'a'D''''g'l'A' '#'''' '#'#'#'n'n'''''''!'!'!''''p'p'o't'S' '!'o'o'o'N'''''''''''''''!'t'a'h't' 'o'd' 't'''n'o'D''''''''''''''''''''''''''''''''''''''t''''n'n'n'a't'u'p'm'o'c' ''''''''''''.'e'l'b'a'd'i'o'v'a' 'l'l'a' 's'i' 'k'r'o'w' 's'i'h'T' '''' '.'n'i'a'g'a' 't'i' 's'p'a'r'w'n'u'''''' 't's'u'j' 'h'c'i'h'w' '-' '''`'e'r'a'p'm'o'C't'r'o'p'm'a'l' 's'e'h'c't'a'm' 't'n'e'm'u'g'r'a' 'e'h't' 'o's' 't's'u'j' ','p'a'M' 's'j'e'l'b'a't'u'm'm'i' 'n'''' 'a' 'o't'n'i'''''' 'h't'i'w' 'd'I'd'l'i'h'c' 's''''''''''d'e'p'p'a'r'w' 'e'd'o'c' 's'i'h'T' '-'n''a' 'n'a'''''''''''''''' 'e'l'g'n'i's''''''''''''''''''''''''''''''' 'r'e't's'a'f' 'h'c'u'm'''''''''''''''''.'p'o'o'l' 'r'o'f' 'a' 'h't'i'w' 't'a'h't' 'o'd' 'n'a'c' 'u'o'y' ','t'''''''''''''''t's'i'l' 'e'h't' 'o't'n'i' 'm'e't'i' 'w'e'n' 'e'h't' 't'r'e's'n'i' 'o't' 's'i' 'l'a'o'g' 'e'h'T' '-'n' ',''''''''''''''''''''''''''''''''''''''''.')'e'u'l'a'v' 'n'r'u't'e'r' 'e'h't' 'e'''''''e' 't'a'g'e'n' 'r'o'(' '`'e'r'a'p'm'o'C't'r'o'p'm'a'l'`' 'f'o' 's't'n'e'm'u'g'r'a' 'e'h't' 't'r'e'v'n'i' 't's'u'j' 'd'l'u'o'h's' 'e'd'o'c''''''''''''j' 'd'l'u'o'c' 's'i'h't' ','g'n'i''')'('e's'r'e'v'e'r' 'n'e'h't' ','g'n'i't'r'o's' 'n'a'h't' 'r'e'h't'a'R'''n'i'h't'y'n'a' ''y'a'w' '''''''''''''''''''''''''''''''''''''''''''''''j' 'e'h't' 'p'a'w's' 't's'u'j' 'y'l'i's'a'e' 'd'l'u'o'c' 'e'd'o'c' 'e'h'T''''''''''''''''''''''t's'u'j' 'y'l'i's'a'e' 'd'l'u'o'c' 'u'o'Y' '.'t'r'o's' 't's'e'w'o'l's' 'e'h't'''''w'o'l's' 's'i' 't's'i'l' 'd'e't'r'o's'-'i't'n'a' 'n'''''''''''''' 's'i' ''' 'f'o' 'e's''''''''''''''''' ','t'l'u's'e'r' 'a' 's'A' '.''u' 'y'v'a'e'h' 's'e'k'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''m'o'r'f''''r'''''n'i' 'e'd''function lamportCompare(op1, op2) {n return opIdCompare(op1.get('opId'), op2.get('opId'))n}n'n''o'c''''''''''''''''''''''''':'e'g'r'e'm'o't'u'a' 'm'o'r'f' 'n'o'i't'c'n'u'f' 's'i'h't' 't'a' 'k'o'o'L''.'t'p'i'r'c's'a'v'a'j''''''s'a'v'j'a' 'n'i' 'w'o'l's' 'a'r't'x'e' 'e'r'a' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'x'e'l'p'm'o'C'''''''''''t'p'i'r'c's'a'v'a'J'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''w'o'l's' 'e'r'a' 's'n'o'i't'a'r'e''!''''''''''''''''''''''''''''''''''''''''''''''''''''' 'f'o' 'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'o'i''''''''''n'i'o't'c'n'u'f' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''7''''6''' 't'o'p's' 'n'a'c' '''''''t'''''''''''''''''''s'e'r'u's'o''''''''y'd'a'e'''''''''''-'e's'r'e'v'''e'''r''-' ''''r'l'a' '')'('''')'''l'c' '2'('''' 'e'h't' '''''''''''''''''''''`''''''''''''''''''''''''''`'n'I''''O't'e'g'`' 'o't''''''''''''''t'c'e'f'f'e' 'o'n' 's'a'h' 't'n'e'm'u'g'r'a' '''`')'('t's'i'L' 'e'h'T' '-'n''''''''''''''''''''''''''''''''''''''''''f'o' 'e's'r'e'v'n'i' 'e'h't' '''' ''''''''''''''''''''''''''t's'i'l' 'a' 'g'n'i't'r'o'S' '.''''''''''''''''''''''''''''''''''''d'e'l'l'a'c' 's'i' 'd'o'h't'e'm' 's'i'h't' 'e'r'o'f'e'b' '''''''''''e'r'a'p'm'o'C't'r'o'p'm'a'l' 'y'b' 'd'e't'r'o's' 'y'd'a'e'r'l'a' 'e'r'a' 's'm'e't'i' 'e'h'T' '-'n''')'''''''''''''''''''''.')'d'e't's'i'o'h' 'e'b' 'd'l'u'o'h's' '2' 'h'g'u'o'h'T'(' '''''''''''''''''''''''''''''''''''''''''''s''('''e'r'''''d'n'i'f'u's'o'l'c' 'o'w't' 'e'h't' 'e'd'u'l'c'n'i' 't'''n'o'd' 'u'o'y' 'f'i' '5' '.'''' 'I' ''''''' 'I'''''''''''''''''''''''''''''''''''''''''''''('''''''''''''''''''''')'?'l'l'a' 'm'e'h't' 't'o'p's' '''u'o'y' 'n'a'C' '.'n'o'i't'c'n'u'f' 's'i'h't' 'n'i' 's'n'o'i't'a'c'o'l'l'a' '6''''''''''''s't'c'e'j'b'o' '5' 'e'r'a' 'e'r'e'h'T' '-'n'n':'s'i'h't' 't'u'o'b'a' 'w'o'l's' 's'g'n'i'h't' 'y'n'a'm' 'o's' 'e'r'a' 'e'r'e'h'T' '''''''''''''''''''''''''function insertionsAfter(opSet, objectId, parentId, childId) {n let childKey = nulln if (childId) childKey = Map({opId: childId})nn return opSetn .getIn(['byObject', objectId, '_following', parentId], List())n .filter(op => op.get('insert') && (!childKey || lamportCompare(op, childKey) < 0))n .sort(lamportCompare)n .reverse() // d''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'d'e't'r'o's' 'e'b' 'd'l'u'o'h's' 'm'e't'i' 'n'a' 'f'''''''f'n'o' 'n'e'r'd'l'i'h'c' 'e'h't''''''''''t'r'o's' 'o't' 'w'o'h' 't'u'o' 'e'r'u'g'i'f' 'o't' ','t'r'e's'n'i' 'h'c'a'e' 'n'o' 'd'e'l'l'a'c' 's'i' 's'i'h'T'n'n'escending ordern .map(op => op.get('opId'))n}'''`'`'`'n''''n'n't'p'i'r'c's'a'v'a'j'`'`'`'n'n':'e'g'r'e'm'o't'u'a' 'm'o'r'f' 'n'o'i't'c'n'u'f' 's'i'h't' 'n'i' 'n'o' 'g'n'i'o'g''''o' 'f'f'u't's' 's'i'h't' 'f'o' 't'o'l' 'a''''''''''''''''''''''''''''''''' 't'a' 'g'n'i'k'o'o'l' 's'e'u's's'i' 'e's'e'h't' 'f'o' 'e'm'o's''''''''''''''e's'e'h't' 'f'o' 't's'o'm' 'e'e's' 'n'a'c' 'u'o'Y'n'n's'u'a'c'e'b' 'w'o'l's' 'a'r't'x'e' 'e'r'a' 's'e'r'u't'c'u'r't's' 'a't'a'd' 'x'e'l'p'm'o'C'p'o' 'e't'''''''''''''''''''''''''''''''''y'a'w'y'n'a' ''''''' 'e't's'a'f' 'y'r'e'v' 't''''''''''''''' 't'''n'n''''n's'i' 't's'u'j' 's'a'p'+'y'p'o'c' 'e'r'e'h'w' ','''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'p'i'r'c's'a'v'a'J' '.'4''''n'n'.''''!'e'k'a't's'i'm' 'e'm'a's' 'e'h't' 's'e'k'a'm' 'e'g'r'e'm'o't'u'A' '?'r'e'i'l'r'a'e' 't'u'o'b'a' 'd'e'k'l'a't' 'I' 'r'e'p'a'p' 't'a'h't' 'r'e'b'm'e'm'e'R' '.'m'e't'i' 'e't'a'r'a'p'e's' 'a' 's'a' 'r'e't'c'a'r'a'h'c' 'd'e't'r'e's'n'i' 'h'c'a'e' 's't'a'e'r't''''''''''''s''''3. Automerge is written''''''''''''''''''''''''' 'n'e't't'i'r'w''''s' 's'i' 'e'g'r'e'm'o't'u'A'''''''''g'r'e'm'o'u't'A' '.'3'n''''''''''''')'!'!'(' 'A'G'R' 'r'o'f' 'e'r'u't'c'u'r't's' 'a't'a'd' 'g'n'o'r'w' 'e'h't' 's'e's'u' '''''s data structures aren't very good.'''''''''''''''''''''''''''''''''''''''''' 'a't'a'd' 'f'o' 't'o'l' 'a' 'o'd' 'o't' 's'd'e'e'n' 'a'm' 't'a'h't' 'e'd'o'c''''''''''''s'j'e'l'b'a't'u'm'm'i' 'e'z'i'm'i't'p'o' 'o't' 'w'o'h' 'a'e'd'i' 'o'n' 's'a'h''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'a' 'e'g''''''''''''.''''''''''''''''''''''''''''''''''''''''''''''''.'d'o'o'g' 'y'r'e'v' 't'''n'e'r'a' 's''''s'e'r'u't'c'u'r't's' 'a't'a'd' 's''''''' 'd'''''e'g'r'e'm'o't'u'A' '.'2'n'e'c'n'a'm'r'o'f'r'e'p''a's'u' 'y'r'o'm'e'm' 's'e's'a'e'r'c'n'i'''''''''''''' '''''''''''' 's'e's'a'e'r'c'e'd' 'y'l'l'a''''''' 's'c'i't'a'm'a'r'd' 't'i' 'd'n'a' 's'j'e'l'b'a't'u'm'm'i' 'y'b' 'd'e's'u'f'n'o'c' 'y'l'l'a'e'r' ''''''''''''s't'e'g'''''''''''''s'i'h't' '*'s'e't'a'h'*' 'r'e'z'i'm'i't'p'o' 'e'h't' 't'u'b' ','y't'i'l'a'n'o'i't'c'n'u'f' 'f'o' 't'e's' 'l'o'o'c' 'a' 's'i' 's'i'h'T''''' 'e'h'T' '.''''''''''r'o'f' ''''''''''''s't'c'e'j'b'o' ''''''''''''t'p'i'r'c's'a'v'a'j' 'n'i' 's'c''''''' 's'i't'n'a'm'e's'''''' 'e'k'i'l'-'e'r'u's'o'l'c' 'u'o'y' 's'e'v'i'g' 'h'c'i'h'w' 'y'r'a'r'b'i'l' 'a' 's'i' 's'j'e'l'b'a't'u'm'm'I' '.'s'j'.'e'l'b'a't'u'm'm'i' 'f'o' 'e's'u' 'y'v'a'e'h' 's'e'k'a'm'''''' 's'e's'u' 'e'g'r'e'm'o't'u'A' '.'1'n'n':'s'n'o's'a'e'r' '3' 'r'o'f' 'w'o'l's' 's'i' 'e'g'r'e'm'o't'u'A''''A'n''?'w'o'l's' 'e'g'r'e'm'o't'u'a''''''''r'e'm'o'u't'a' 's'i' 'y'h'W' '#'#'#' ' ''''' ' ' ' ' '' ' ' ' ' ' ' ' ' ' ' ''s'u'o'i'v'b'o' 'e'h't' 'n'i''| automerge @ 1.0.0-preview2 |'''1'9'2'''' 'S'J''''''''''1'6'.'0''''e'n'i'l'e's'a'b''' 270s |n''''''''''''t'i'l'p's''' 'd'n'a' 'g'n'i'r't'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s' 't'p'i'r'c's'a'v'a'j' 'a' 'e't'a'e'r'c'''''''''''''''''' 's''''''''''''''''''' '2'w'e'i'v'e'r'p'-'0'.'0'.'1' '@''''''''''s't'p'i'r'c's'a'v'a'j' 'e's'u'''''''''' ')'('e'c'i'l'p's' 't's'u'j' 'e'w' 'e'r'e'h'w' ','n'o's'i'r'a'p'm'o'c' 'e'n'i'l''''o'e's'a'b' 'e'l'p'm'i's' 'a' 'e'd'u'l'c'''''''c' 'n'i' 'o't' 'g'n'i'o'g' 'o's'l'a' 'm'''I' '.'''':'e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't' 's's'e'c'o'r'p' 'o't' 's'e't'u'n'i'm' '5' 'r'e'd'n'u' 'e'l't't'i'l' 'a' 's'e'k'a't' 'e'g'r'e'm'o't'u'a' ','e'r'o'f'e'b' 'd'i'a's' 'I' 's'A''''w'o'n' 'r'o'f' 'e'n'i'f' 'y'l'b'a'b'o'r'p' 's't'a'h't'''''''''''''''''' 's't'i'd'e' 't'n'e'r'r'u'c'n'o'c''''''''''''' 's't'i' 't'u'b' ',')'r'e's'u' 'e'l'g'n'i's' 'a' 't's'u'j' 's't'i'(' 'e'c'a'r't' 's'i'h't' 'n'i' 's't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'o'n' 's'''e'r'e'h'T' '''''''''''''''''''''''''''''''''''''''''''''''''''''f'r'e'p'-'e''''''h''' 'o'S' How does'''''' '|'''''''''''''''''''''| ------- | ---------- |n''''''''''e'g''''s'0'7''''6'2''''r'e'm'o't'u'a'''''''''''''''''''''''''|' '-'-'-'-'-'-'-'-'-'-' '|' '-'-'-'-'-'-'-' '|'n'|' 'n'e'k'a't' 'e'm'i'T' '|' ' ' ' '''''t's'e'T'n'''''''e'g'r'e'm'o't'u'a''' it do?'''g'''r'e'm'o't'u'a'''''''''a'r'e'm'o'u't'a' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'?'o'd' 't'i' 's'e'o'd' 'w'o'H' '''' '.'r'e'p'a'p' 'c'i'm'e'd'a'c'a' 'n'a' 'g'n'i't'i'r'w' 'e'l'i'h'w' 'e'k'o'r't's'y'e'k' 'h'c'a'e' 'd'e'd'r'o'c'e'r' ''''''t's'u'j' 'n'i't'r'a'M''''m' 'e'r'e'h'w' 'y'r'o't's'i'h' 'g'n'i't'i'd'e' 'n'a' 's'i' 's'i'h'T'''''''''''c'e'r' 'n'i't'r'a'M' '.'''''''''''https://github.com/automerge/automerge-perf')'/'(']'e'c'a'r't' 'g'n'i't'i'd'e' 's'''n'i't'''''''n'i'r'a'M'[' 'g'n'i's'u' 'm'''I' ','g'n'i'k'r'a'm'h'c'n'e'b' 'r'o'F'''''''''' 'e'W'''''n'n'n'n'n''s'e'k'i'Y' '.'''''''''''''c'b'a''' 'g'n'i'p'y't' 'r'e't'f'a' 'e't'a't's' 'l'a'n'r'e't'n'i' 's''''''s'e'g'r'e'm'o't'u'a' 's'i' 's'i'h't''''''''''''''''e'v'a'h' 'y'l't's'e'n'o'h''''h' 'I' '-''i't'l'''''''''''''*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '-' 'o's' 'k'n'i'h't' 'I' 't's'a'e'l' 't''''c'A' '''''''''''''''''''''''''''''''''''''''''''''p'u' 'k'o'o'l' 'e'w' ','s'n'e'p'p'a'h' 't'r'e's'n'i' ''n'n'a' 'e'm'i't' 'h'c'a'E' '.'y'a'w' 'd'e's'a'b' 'e'e'r't' 's'u'o'i'v'b'o' 'e'h't' 'n'i' 't'i' 's'e'o'd' 'y'r'a'r'b'i'l' 'e'g'r'e'm'o't'u'a' 'e'h'T' '?'e'g'r'e'm'o't'u'a' '*''''''''''n'''''''''''''''''''''''''n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'n'e'm'e'l'p'm'i' 'u'o'y' 'd'l'u'o'h's' 'w'o'h' 'o'S'''''''''''.'n''l'a's'r'e'v'a'r't' '''''''''.'h'c'r'a'e''''o's' 't's'r'i'f'-'h't'p'e'd' 'a' 'h't'i'w' 'e'e'r't' 'e'h't' 'g'n'i'n'e't't'a'l'f' 'm'o'r'f' 't'e'g' 'u'o'y' 'r'e'v'e't'a'h'w' 's'i' ''''''''''''' 's'i' 'e'u'l'a'v' 's'''''' 't's'i'l' 'e'h'T' '-''n'n'.'D'I' 'y'b' 'n'e'h't' 'r'e'b'm'u'n' 'e'c'n'e'u'n''q'e's' 'y'b' 't's'r'i'f' 'm'e'h't' 't'r'o's''u'm' 's'i'h't' 's'e'v'l'o's' 's'j'Y' '.'h'c'a'o'r'p'p'a' 'y'l'n'o' 'e'h't' 't'''n's'i' 's'i'h'T''''s'j'Y'n''n' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'- Whenever an item has children, put all the''p''''''''''''''''''''''''''''''''''''''''''' 'e'h't' 'l'l'a' 't'u'p' ','n'e'r'd'l'i'h'c' 's'a'h' 'm'e't'i' 'n'a''''''h' 'u'o'y' 'r'e'v'e'n'e'h'W''u'''''''''''''n''''e'v'a'h' 's'm'e't'i' 'o''n'w't' '' 'y'a'w' 'e'h't' 'l'l'a' ','s't'n'e'r'a'p' 's't'i' 'o't' 'm'e't'i' 'h'c'a'e' 'm'o'r'f' '''- If'''''' 'f'I' '-'n'e'e'r't' 'e'h't' 'd'l'i'u'B'''''''''''''''''e'e'r't' 'e'h't'n'' 'e'n'i'g'a'm'I'''''''''''''''''''''n''''''''''''''''''''t'n'e'r'a'p' ''''''' 'e's't'i' 'r'e't'f'a' 't'h'g'i'r''''''''''s't'i' 'r'e't'f'a' 's'e'o'g' 'g'n'i'h't'y'r'e'v'E' '-'n'n':'e'r'a' '*'s'c'i't'n''n'a'm'e's'*' 's'''e'g'r'e'm'o't'u'A'Insert 'c' id `(s'n'e', '2'''seq: *0*'ph, 2)` after `(seph, 1)`n''*'r'n''e'b'm'u'n' 'e'c'n'e'u'q'e's'*' 'a' 'd'e'''' 'l'l'a'c' '''',''''i' 'a'r't'x'e' 'n'a tiny bit more data to each item.'r `ROOT`n- Insert 'b' id `(seph, 1)` after `(seph, 0)`n- Insert''Note the 'x' an''''''''''''''''''''''t'n'e'r'a'p''''''''''s'e'm'i't'e'm'o's' '' ''''r'e'm'a's' 'e'h't' 'e'r'a'h's''''''''''''''''''''''''''''''t'a'h't' 'o'd' 'o't' 't'n'a''''*'w' 't'''n'''o''*'d' 'e'w' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '.'m'e't'i' 'h'c'a'e' 'o't' 'a't'a'd' 'e'r'o'm' 't'i'b' 'y'n'i't' 'a'''''''''''''''''' 'o't' 'm'e't'i' 'a'r't'x'e' 'n''''''''''u'q'e's' 'a'''''''''''''''''n'o'i't'a'm'r'o'f'n'i' 'e'r'o'm' 'g'n'i'd'd'a' 'y'b' 's'i'h't' 's'e'v'l'o's' 'A'G'R' '.'''c'b'X''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''a''' 'h't'i'w' 'p'u' 'd'n'e' 's'y'a'w'l'a' 'd'l'u'o'h's' 'e'w' 'e'r'a' 's'D'I' 'e'h't' 't'a'h'w' 'r'e't't'a'm' 'o'n'''''''''''''''''''''' 'd'l'u'o'h's' 'm'e't'i' 'w'e'n' 'y'm''''''' 'I' 'e's'a'c' 's'i'h't' 'n'I' '!'e's'a'c' 's'i'h't' 'n'i' 't'o'n' 't'u'B' '.'s'D'I' 'm'e't'i' 'r'i'e'h't' 'g'n'i'r'a'p'm'o'c' 'y'b' 't'a'h't' 'e'v'l'o's'e'r' 'n'a'c' 'e'w' 'd'n'a' ',''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'p'y't' 'y'l't'n'e'r'.''r'u'c'n'o'c'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''h'w'''''''''''''n'i' 'h'c'i'h'w' 't'u'o' 'e'r'u'g'i'f' 'o't' 's'D'I' 'm'e't'i' 'e'h't' 'e'r'a'p'm'o'c' 'y'l'l'a'm'r'o'n' 'e'w' 'd'n'a' ','n'o'i't'a'c'o'l' 'e'm'a's' 'e'h't' 'n'i' 'e'p'y't' 's''''t'r'e's'u''''c' 'n'e'h'w' 'n'e'p'p'a'h' 'l'l'i'w' 's'i'h'T''''S' '.'n'o'i't'a'c'o'l' 'e'm'a's' 'e'h't' 't'a' 't'r'e's'n'i' 'd 'b' both''''''''''''''''''''''''''''' 'h't'o'b' '''b''' 'd'n'a' '''x''' 'e'h't' 'e't'o'N'''''''''''''''o'o'g' 't'''n's'i' 's'i'h'T'n''n' 'c' id `(seph, 2)` after `(seph, 1)`'n'n':'e'v'a'h' 'e'w' 'n'e'h'T'''''''h'W''''''''''''''''''':'s'm'e't'i' 'e's'e'h't' 't'e'g' 'I' '.'''c'b'X''''b'a''' 't'e'g' 'I' 'o's' ',''*''''''''*''''''''''''''''''''''b' 'd'n'a' 'a'''''' 'n'e'e'w't'e'b' '''x''' 'n''''''''' 'a' 't'r'e's'n'i''''''''''d'n'u' 'I'''' ' 'y'a's' 's'''''''s' 't'e'L'n''n'''''How should ''''''''''''''''''''''''''''''' 'a' 's't'i' ','l'l'e'W' '''''''''''''''''''''''''''''''''''e'r'e'h' 'm'a'r'g'a'i'D' '>'n'n'!'e's'r'u'o'c' 'f'o' 'e'e'r't' 'A' '?'t'a'h't' 't'n'e's'e'r'p'e'r' 'you'''''''''''''''' 'u'o'y' 'd'l'u'o'h's''''w' 'w'o'H'n'n''''''''''''''''')'0' ','h'p'e's'('''''''''''''''`'''''''''`'''')'T'O'O'R'(' 'r'e't'f'a' '''`')'0' ','h'p'e's'(' 'd'i' '''a''' 't'''' 'r'e's'n'I' '-'n'n':'s'm'e'''''''e''''e'm't'i' '3' 's'e't'a'e'r'c' 'e'g'r'e'm'o't'u'a' ','''c'b'a''' 'e'p'y't' 'I' 'f'i' 'g'E' '.'r'e't'f'a' 'g'n'i't'r'e's'n'i' 'e'r'''u'o'y' 't'a'h'w' 'e'm'a'n' 'u'o'y' ','g'n'i'h't'e'm'o's' 't'r'e's'n'i''''''''''''' 'u'o'y' 'r'e'v'e'n'e'h'w'''''''''r'e'v'e'e'n'h'w''''''''''''''''''''''''h'c'i'h'w' 's'e'm'a'n'''''''''''''''''w''''''n'i' 't'i' 't'a'h't' 's'e'i'f'i'c'e'p's' 't'r'e's'n'i' 'h'c'a'e' 'd'n'a' ',''''''''''''' 'n'o' 'd'e's'a'b' '''''''''''''''' isn't as bad as you think,'''''''''a'c' 'e'w' '''''''''''''''''''''''''''','k'n'i'h't' 'u'o'y' 's'a' 'd'a'b' 's'a' 't'''n's'i' 'h'c'i'h'w' '-' ''''''''''''''' 'n'o' 'd'e's'a'b''''(' 'D'I' 'e'u'q'i'n'u' 'a' 's't'e'g'''''''''''''''''''' 'a' 'o't'n'i' 'd'e't'r'e's'n'i' 's'i'''''''''''''''''''''''''''''''''' 't'n'e'm'u'c'o'd' 'e'h't' 'n'i' 'm'e't'i' 'd'e't'r'e's'n'i' 'h'c'a'E'''''''''''s'r'e's'u' 'n'e'h'W''' '.'s'r'e't'c'a'r'a'h'c' 'f'o' 't's'i'l' 'a' 's'a' 't'n'e'm'u'c'o'd' 'd'e'r'a'h's' ''''''''''t's' 'a' 'f'o' 'k'n'i'h't' ')'''' 's'T'D'R'C' 'r'e'h't'o' 'd'n'a'(' 'e'g'r'e'm'o't'u'A'''''''''''''e'k'i'L''''''''''''''''''''''''''''''''''''''''''e'g'r'e'm'o't'u'a' 'n'i' ''''''''''''''''''''''''''''''''''''''''''''t's'i'l' 'a' 's'a' 'g'n'i'r't's' 'a' 't'u'o'b'a' 'g'n'i'k'n'i'h't' 'y'b' 's'k'r'o'w' 'g'n'i't'i'd'e' 't'x'e't' 'e'v'i't'a'r'o'b'a'l'l'o'C''''C'''''''''''' 'g'n'i'o'd'''''''''''g'n'i's's'e'c'o'r'p' 'n'e'h'W'n'n'.'g'n'i'h't' 'f'o' 't'r'o's' 't'a'h't' 'o't'n'i' 'e'r'''u'o'y' 'f'i' 'r'e'p'a'p' 'a' 'n'i' 't'u'o'b'a' 'd'a'e'r' 'n'a'c' 'u'o'y''''c' 'h'c'i'h'w' ',''e'l'l'a'c' 'm'h't'i'r'o'g'l'a' 'n'''''' '''''''''''''o'g'l'a' 'n'a' ' '.'s'k'l'a't' 't'n'e'l'l'e'c'x'e' 'd'n'a' 'k'o'o'b'''''''''''''k'o'o'B' 's'i'h' 'm'o'r'f' 's'u'o'm'a'f' 't'i'b' 'e'l't't'i'l' 'a' 's'''o'h'w' ','n'n'a'm'p'p'e'l'K' 'n'i't'r'a'M' 'y'b' 'n'e't't'i''''t'r'w'''''''''''''A'G'R' 'n'o' 'd'e's'a'b' 's't'I' '.'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c'''''c'n'o'c' 'o'd' 'u'o'y' 'p'l'e'h' 'o't' 'y'r'a'r'b'i'l' 'a'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'g'r'e'm'o't'u'A' '.'p'l'e'h' 't'''n's'e'o'd' 't'a'h't' 's'p'o'O''''S' '.'T'D'R'C' 'A'G'R' 'e'h't' 'f'o' 'n'o'i't'a't'n'e'm'e'l'p'm'i''''''''''m'h't'i'r'o'g'l'a' 'n'a' 's'i' 'e'g'r'e'm'o't'u'A''w'y'n'a' '''''''''''''''n'n''''''?'e'g'r'e'm'o't'u'a' 'n'a' 's'i' 'h't'r'a'e' 'n'o''''a' 't'a'h'W' '#'#'n'n'h't'i'w' 't'r'a't's' 's't'e'l' ','y'l'l'a'u't'c'a' 'l'l'e'W'n'n'.'t's'a'f' 't'i' 'e'k'a'm' 't'a'h'''''''''' 't'a't' 's'p'e't's' ''''''''''e' 's'e'h't' 'l'l'a' 'd'n'a' ','w'o'l's' 's'i' 'e'g'r'e'm'o't'u'a' 'y'h'w' 't'u'o'b'a' 'k'l'a't' 's't'e'L'n''n'o'i't'a'z'i'm'i't'p'o' 't'u'o'b'a' '''''''''''''''g'n'i'k'n'i'h't' 's'e'd'a'c'e'd' 't'n'e'p's' 'e'v'''o'h'w' 's'e's'u'i'n'e'g' 'r'e'p'u's' 't'''n'e'r'a''A'''''''''''''''''''''''''''''''t'''n'o'd' 's'r'e'h'c'r'a'e's'e'r' 'S'C' 'f'o' 's't'o'L'''''' 't's'o'M' '' '*'s'n'o'i't'a't'n'e'm'e'l'p'm'i'*' 'e'h't' 'e'k'a'm' 'o't''''e'h't' 'w'o'h' 't'u'o'b'a' 'g'n'''i'h't'y'n'a't'n'e'r'e'f'f'i'd' 'f'o' 'w'e'f' 'a' 'g'n'i's'u' 'y'b'e'm'a'S' '.'''*'s'c'i'''''n'a'r''t'''n'a'm'e's'*'''''''''''''''''''''''''''''''''''''''''''''''k'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ',')'(']''''''''''''''''''''''''''''''''''''''I have a new implementation that can'''''''s's'e'c'o'r'p' run the same ed''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'i' 'y'b' 'd'e't'h'g'i'l'e'd' 'y'l'r'e't't'u' 'm'''I'''''''''''''''''!'''''!'*'l'u'f't'h'g'i'l'e'd'*' 's't'i' 'd'n'a' '-' 'k'r'o'w' 'n'o'i't'a'z'i'm'i't'p'o' 'm'o'r'f' 'n'e't't'o'g' 'r'e'v'e' 'e'v'''I' 'p'u' 'd'e'e'p's' 't's'e'g'r'a'l' 'e'h't' 's't'I' '''''''T' '.'r'e't's'a'f' 's'e'm'i't' 'd'n'a's'u'o'h't' 'n'e't'''' ''''''''' 'x'''' '0'0'0' '0'1' 't'u'o'b'a' 's't'a'h'T' '.'s'd'n'o'c'e's' '3'2'''''''''' '2'3'''iting trace'''''l'l'e'W' ' in''''''''''''''.'s'd'n'o'c'e's' '5'6'0'.'0'''''''''''''s'm'5'6' '''''''''''''''''''''''''''''''''''' 't'a'h't' 'n'o'i't'a't'n'e'm''''' 'n'i' 'e'l'p'm'i''''e' 'w'e'n' 'a' 'e'v'a'h'''''''''''''''''''''''''''''''e'c'a'r't' 'g'n'i't'i'd'e' 'e'm'a's' 'e'h't' 'n'u'r' 'n'a'c' ''''' 'e'v'''I' '.'s'd'n'o'c'e's' '0'7'2' 's'e'k'a't' ')'T'D'R'C' 'r'a'l'u'p'o'p' 'a'(' '''''''')'('e'c'a'r't' 'g'n'i't'i'd'e' 's'i'h't'[' 'n'u'r' 'o'T''''''''''e'g'r'e'm'o't'u'A' ''''n'''' '?'g'n'o'r'w' 'w'o'H'n'n'''''''T' '.'g'n'o'r'w' 'r'e'p'u's' 's'a'w' 'I' 't'u'o' 's'n'r'u't' 't'i''' 't'u'B' '.'''' '*'y'l'w'o'l's'*' 'k'r'o'w' 'd'l'u'o'h's' 'y'e'h't' ','s'i' 't'a'h'T'r'o'w' 'd'l'u'o'h's' '*'s'n'o'i't'a't'n'e'm'e'l'p'm'i'*' 'e's'o'h't' 'w'o'h'''''''''''' 'e's'o'h't' 't'a'h'w''''w'o'h' 'w'e'n'k' 'e'w'''' 'e'm'a'S'f'i'w'S'''''''s't'a'h'T' ' 'd'n'''''''''''''''''''''''''''''['''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'n'.'g'n'o'r'w' 'o's' 's'a'w' 'I' 't'u'B' '.'''w'o'l's' 's'i' '''m'h't'i'r'o'g'l'a' 'e'h't' 'e's'u'a'c'e'B' '.'y'a'w' 'w'o'l's' 'A' '.'y'a'w' 'n'i'a't'r'e'c' 'a' 'd'e't'n'e'm'e'l'p'm'i' 'e'b' 'o't' 'd'e'd'e'e'n' 's'm'h't'i'r'o'g'l'a' 'e's'o'h't' 't'n'a'e'm' 't'a'h't' 'g'n'i'm'u''''m's's'a' 'd'n'a' '*'s'c'i't'n'a'm'e's'*' 'e'h't'''''''e'h' 't'u'o'b'a' 'g'''''''g' 'n'i'k'l'a't' 's'r'e'p'a'p' 'g'n'i'd'a'e'r'''''''''' 'g'n'i'm'u's's'a' 's'a'w' 'I' '.'s'r'e'h'c'r'a'e's'e'r' 'e's'o'h't' 's'a' 's'e'k'a't's'i'm' 'e'm'a's' 'e'h't' 'g'n'i'k'a'm' 's'a'w' 'I' ','s't'n'e'v'e' 'f'o' 'n'r'u't' 'g'n'i's'i'r'p'r'u's' 'a' 'n'i'''''''i'r'p'r'u's' ','y'a'w'y'n'A' '.')'s'p'o'o'(' ''''''''''(' '.'''m'h't'i'r'o'g'l'a' 'e'h't''' 'h't'i'w' ''''''''''''''''''''''t' 'h'i't' 'w'm'e'l'b'o'r'p' 't'n'e'r'e'h'n'i' 'e'm'o's' 's'a'w'''''''w'a' 't'a'h't' 'd'e'm'u's's'a'''''''''''''''''''' 'o't' 'p'u' 't'a'h't' 'd'e'k'l'a'h'c' 's'y'a'w'l'a' 'I' 'd'n'a' ','w'o'l's' 'r'e'p'u's' 'e'r'a' 's'T'D'R'C''''c' 't's'o'M' '.'y'l'e't'a'l' 's'''' 'T'D'R'C' 'n'i' 'd'e't's'e'r'e't'n'i' 'g'n'i't't'e'g'''''''''''''' 'h't'i'w' 'g'n'i'y'a'l'p' 'n'e'e'b' 'e'v'''I' ',')'(']'''w'o'n'k''''n' 'y'a'm' 'u'o'y' 's'a' 'o'S'n'n'e'g'r'e'm'o't'u'A' '#'#'''''''''' 'o'S'n''''''''''''' 'o's'n'n'-'-'-''''S'n'n'''!''''a' 'i' 'e'd'o'c''I' 'o'S' I translate'''y'm' '''d''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'd'e't'a'l's'n'a'r't' 'I' '.'s'g'n'i'h't' 'f'o' 'e's'n'e's' 'a' 't'e'g' 'o't' 'r'e'd'r'o' 'n'i' ','''' 'd'n'a't's'r'e'd'n'u' 'y'd'a'e'r'l'a' 'I' 'g'n'i'h't'e'm'o's' 'm'a'r'g'o'r'p' 'o't' 't'n'a'w' 'I' 'e'g'a'u'g'n'a'l' 'w'e'n' 'a' 'p'u' 'k'c'i'p' 'I' 'n'e'h'w' 's'e'm'i't'e'm'o'S'''''' 'n'e'h'W'n''e'h'c'r'a'e's'e'R' 'S'C''''''''''''.')'t's'i't'n'e'i'c''''''''''n'c'i'S' 'h'c'n'e'r'F' 'r'M'''''''''' 'r'm' '*'u'o'y'*' 't'a' 'g'n'i'k'o'o'l' 'm''''''''I'(' '''''''''''''''''''''''''''''''' 'r'M' '?''''''''''''''''' 'o'g'a' 's'r''a'''h't'a'e'y' 'w'e'f' 'A''I't'u'o'b'a' 'g'n'i'k'l'a't' 'n'e'v'e' ''''''''''''''g'n'i't't'e'g'''''''t'a''''e'h't' '''''''''''''''''''''o't'n'i' 'd'e't'a'l's'n'a'r't' ''' 'g'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'n''''''''''' 'r'e'p''''''''''''''''''.'w'o'W' '.'r'e't's'a'f' 'x'0'0'2' '' '''s'e'm'i't' ''u'r'''o'd''' 'd'l'u'o'c'''''''''''''''''''''''''''''.'d'n'o'c'e's'/'M'0'2' 'f'o' 'e't'a'r' 'a' 't'a' 'n'a'r' 'C' 'n'i' 'n'o'i't'c'n'u'f'''''e'd'o'c' 'e'm'a's' 'e'h't' 't'u'B' '!'d'a'b' 't'o'N' '.'d'n'o'c'e's' 'r'e'p' 's'e'm'i't' '0'0'0' ''''0'0'0'1' 't'u'o''''''''''t'o'u'b'a' 'n'o'i't'c'n'u'f' 'm'r'o'f's'n'a'r't' 'y'm' 'n'u'r' 'd'l'u'o'c' 'I' 't'p'i'r'c's'a''''s'v'a'j' 'n'I' '.'t'o'n' 'y'l'e't'u'l'o's'b'a' 's'a'w' 'e'c'n'a'm'r'o'f'r'e'p' 'e'h'T' '.'e'm'a's' 'e'h't' 'e'r'a' 's'c'i't'n'a'm'e's' 'e'h'T''''''r'e't'f'a'e'w' 'e'r'a' 't'a'h'w' ','w'o'l's' 's'i' '''m'h't'i'r'o'g'l'a''' ''''''''''O''' 'n'''''''''''''''' 's'i' 'm'e't's'y's' 'a' 'y'a's' 'e'w' 'n'e'h'W'n'n''''''''''''''''''''''''''''' 'e'l'p'm'i's''''''''''m'h't'i'r'o'g'l'a' '' 'a''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''R'''''''''''''''''''''''''''''''''''''''''''''''''''''''m'r'o'f's'n'a'r't' 'e'h'T' '.'e'c'a'l'p' 'h'c'a'e' 'n'i' 'm'h't'i'r'o'g'l'a' 'e'm'a's' 'e'h't' 's't'I'''''''''' 'e'm'a's' 'e'h'T'''''''''''''''m'h't'i'r'o'g'l'a' 'e'm'a'S' '.''''''t's'''''''''''''u'r' 'd'n'a' 'o'G' 'd'n'a' 't'f'i'w'S'''''f'i'w's''''''''''''''''d'n'a' ','t'p'i'r'c's'e'p'y'T' 'd'n'a' ','t'p'i'r'c's'a'v'a'J' 'd'n'a' ','C' 'n'i' 'e'k'i'l' 'k'o'o'l' 'd'l'u'o'w' 'e'd'o'c' 'e'm'a's' 'e'h't''''''''''''''''l' 'k'o'o'l' 'd'l'u'o'w' 't'i' 't'a'h'w' 's'u'o'i'r'u'c' 't'o'g' 'I' 'e's'u'a'c'e'b' ',''.'''''''-'''n'i'a'l'p''' 'd'''''''''''''''''''''''''''''''''''''' '.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''n'r'a'e'l' 'o't' 't'n'a'w' 'I''''w' 'e'g'a'u'g'n'a'l' 'a' 'f'o' 'e's'n'e's' 'a' 't'e'g''''''e'g'a'u'g' 'o't' 'y'a'w' 'a' 's'a' 't'i' 'e's'u' 'I' '-' '''' 's'e'g'a'u'g'n'a'l' 't'n'e'r'e'f'f'i'd' 'f'o' 'h'c'n'u'b' 'a' 'n'i'''e't'n'e'm'e'l'p'm'i' 'e'v'''I''''''''''''''''''''''''''''''''''''''''''o'g'a' 's'r'a'e'y' 'w'e'f' 'a' 'm'o'r'f' 'm'h't'i'r'o'g'l'a' 'T'O' 't'x'e't' 'y'M''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''g'n'i's'u' 'e'w' 'e'r'a''''''''''''''''''''''''''''''''''''''''''''''''''''n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''r'e'v'''''''r'f' 't'n'e'r'e'f'f'i'd' 'a' 't'a' 'g'n'i'k''''''''''''' 'g'n'i'o'o'l' 'p'u' 'd'n'e' 'l'l'''I' '.'e'g'r'e'v'n'o'c' 't'''n'o'w' 's't'i'd'e' '''s'r'e's'u' ','t'c'e'r'r'o'c'n'i''''''''t'c'e'r'r'o'c' 'e'r'a' 's'c'i't'n'a'm'e's' 'e'h't' 'f'I'n'n'?'s'o'i'r'a'n'e'c's' 't'a'h'w' 'r'o'f' 'd'n'a''''' 'r'o'f' ','t'i' 's'i' 'd'e'z'i'm'i't'p'o' 'l'l'e'w' 'w'o'H' '' ''''''''''''''''''''''''''' '?'s'e'r'u't'c'u'r't's' 'a't'a'd' 't'a'h'W' '?'e'g'a''''a''''e'u'g'n'a'l' 't'a'h'W' '.'m'e't's'y's' 'e'h't' 'f'o' '*'n'o'i''''''''''''' 'n'i'o't'a't'n'e'm'e'l'p'm'i'*' 'e'h'T' '.'2''''''''''.'2'n'n''''''''''''t'n'e'm'happens'''''''''''''''''''''''''''''''''''''''''''''''''''''?'n'o'i't'a'u't'i's' 'e'h't'''t'i' 'e'v'l'o's'e'r' 't'i' 's'e'o'd' 'w'o'H' '?'w'o'n'k' 't'i' 's'e'o'd' 'w'o'H' '?'''o'h''u'c'o'd' 'e'h't' 'n'i' ''''''''''''''''?'s'n'e'p'p'a'h' 't'a'h'w''''''''''''''''''''''' 't'a'h'W' '?'l'l'e't' 'e'w' 'n'a'c''''d' 'w'o'h' ','e'c'a'l'p' 'e'm'a's' 'e'h't' 'n'i' 'n'e'p'p'a'h' 's't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'n'e'h'W' '.''''''''''''''''''''''''' 'e'b'i'r'c's'e'd' 'n'a'c' 'e'w' 'h'c'i'h'w' ','m'e't's'y's' 'e'h't' 'f'o' 's'c'i't'n'a'm'e's' 'e'h'T' '.'1'n'n':'''s't'r'a'p' 'e't'a'r'a'p'e's' 'y'r'e'v''''''''''''''''n'o' 'g'n'i'o'g' 's'g'n'i'h't' 'o'w't' 's'''e'r'e'h't' 'y'l'l'a'e'r' 't'u'b' '-' '''m'h't'i'r'o'g'l'a''' 'n'a' 's'a' 'm'e't's'y's' 'h'c'a'e' 'e'b'i'r'c's'e'd' 'e'W' '.'s'd'r'o'w' 'h't'i'w' 'm'e'l'b'o'r'p' 'a'''''''a' ' 'e'v'a'h' 'e'w' 's'm'e't''''e's''''''''''t's't'y's' 'g'n'i't'i'd'e' 'e'v'i't'a'r'o'b'a'l'l'o'c'''''''''''''''''''' 'g'n'i't'i'd'e' ''''''''''g'n'i't'n'e'r'r'u'c'n'o'c' 'r'e'h't'o' 'd'n'a' 's'T'D'R'C' 't'u'o'b'a' 'k'n'i'h't' 'e'w' 'n'e'h'W'n'n'!'h'g'r'A' '.'''n''''''n'n''i'p'p'i'l'f'''''''''''''''''''''''''''''''''''''''''''''''''''''''.'t'i' 't'u'o'b'a' 'e'm' 'g'n'i'k's'a' 'd'n'a' 'r'e'p'a'p' 'e'h't' 'g'n'i'd'a'e'r' 'd'e't'c'e'p's'e'r' 'I' 'e'l'p'o'e'p' 'e'v'a'h' 't'''n'd'i'd' 'I'''''''''' 'I' 'e'l'p'o'e'p' 'f'i' 'h'c'u'm' 'o's' 'd'n'i'm' 't'''n'd'l'u'o'w' 'I' '''d'o'd''''r'''''''''''''''''r'e'h'c'r'a'e's'e'r' 'r'm' 'u'o'y' '''h't'i'w' 'm'e'l'b'o'r'p' 'a' 't's'u'j' 's'i' 's'i'h'T' '.'m'h't'i'r'o'g'l'a' 'e'''''''i'e'h't' 'h't'i'w' 'm'e'l'b'o'r'p' 'a' 't'''n's'i' 's'i'h'T'''t' ''''''''''''''''''''''''''''''''''''''''''''' 'm'h't'i'''' 'r'o'g'l'a' 'e'h't' 't'u'o'b'a'''''''''''!'''t'a'h't' 'm'o'r'f' 'g'n'i'h't'y'n'a' 'n'r'a'e'l' 't'''n'a'c' 'e'w'''''d'e'd'e'e'n' 'h'c'i'h'w'''''''''s't'i' 'h't'i'w' 'h'c'a'e' '-' 's'n'o'i't'a'r'e'p'o' ''''0'0'0'0'1' 'o't'n'i' 't'r'e's'n'i' 'e'h't' '''''' ''''','''t'a'r'e'p'o' '1' 'g'n'i't'a'e'r'c''r'a'h'c' ''''''''''''''''''''''''n'i' 's'r'e't'c'a'r'a'h'c' '0'''''''''''''''''''''''''''r'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''d'n'a' '1' 'n'a'h't' 'r'e'h't'a'r' 's'n'o'i't'a'r'e'p'o' '0'0'0'1' 'g'n'''''''''''''''''''''''''''''''''''d'a'b'e''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.'*'u'o'y'*' 't'u'o'b'a' 'g'n'i'h't'e'm'o's' 's'u' 's'l'l'e't' 't's'u'j' 't'I' '.'t's'e't' 'o't' 'g'n'i'y'r't' 'e'r'''u'o'y' 't'a'h'w' 't'u'o'b'a' 'g'n'i'h't'y'n'a' 's'u' 'l'l'e't' 't'''n's'e'o'd' 't'a'h'T'''''''''''e'l' 't'''n'a'c' 'I' ''t'o'r'w' 't's'u'j' 'u'o'Y' '.'e'c'n'e'i'c's' 't'''n's'i'''i's's'e'c'o'r'p' 'e'r'e'w' 'y'e'h'T' '.'n'o'i't'a'r'e'p'o' 'g'n'i'''t'i'd'e' 'n'w'o' 's't'i' ''t'c'a'r'a'h'c' 'h'c'a'e' 'g'n'i't't'i'l'p's'''0'0'1' 'e's'o'h't''0'0'0'1' ','y'a's'(' 't'x'e't'u'h'c' 'g'i'b'''''''''''''''''''''''t'n'e't'n'o'c' '''t'a'h't' 'f'o' 'l'l'a' '''''''''''''''''''''''''''''''''''''''''''''''''e'n'o' 'h'c'''a'e''n'o'i''''''''''n'i'o't'a'r'e'p'o' 'e'n'o' 'n'i' 'g'n'i'''''''n'o'r't's' 't'a'h't'''e'd'o'c' 'f'o'''''''''''''c' 'o'f'''''''''' 'o'f' 'k'c'o'l'b' 'a' 'd'e't's'a'p' 'r'e's'u' 'a''''''''''''''''e' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'e'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''t'g''''u'B' '!'t'a'h't' 'o'''''''''''''''''''h'c'a'o'r'p''''''''''''''''''''''''''.'*'e'd'o'c' 'r'u'o'y'*' ''''''' 'i'h't'i'w' 'm'e'l'b'o'r'p'p'a'''''''''''''''''''''' 'a' 's'i' '''''''s'i's'i'h'T' '.'m'h't'i'r'o'g'l'a' 'e'h't' 'h't'i'w' 'd' 'u'o'y' 'f'i' 'w'o'l's' 'e'b' 'l'l'''t'i' 'e's'r'u'o'c' 'f'o' '-' ''''''' '-'h'a'e'y' ','n'a'e'm' 'I' ''''''''''''''''''''''''''''m'e'l'b'o'r'p' 'a' 't'''n's'i' 's'i'h't' '~''''''' '-' 'h'a'G' '.'e'r'u't'c'u'r't's' 'a't'a'd' 'w'o'l's'''''' 'w'o's'l' 'y'z'a'r''''a'c'''''''u'o'i'v'b'o' 'r'i'e'h't' 'o''''i't'n'i' 'm'e'h't' 'g'n'i''''e't'r'e's'n'i' 'd'n'a' 'e'n'o' 'y'b' 'e'n'o' 'r'e't'c'a'r'a'h'c' 'w'e'n'''''''''' 'd'e't'r''''''''''''''''''''''''''''''m'e'h't' 'g'n'i'''''''d'e't'r'e's'n'i' 'd'n'a' 'e'n'o' 'y'b' 'e'n'o' ''e's'n'i''''''''''r'e't'c'a'r'a'h'c' 'h'c'a'e' 'g'n'i'k'a't'd'o'c''''''''''''''' 's'a'w' 'm'h't'i'r'o'g'l'a' 'r'i'e'h't' ','t'x'e't' 'f'o' 'k'c'o'l'b' 'e'n'o' 'g'n'i't'r'e's'n'i' 'f'o' 'd'a'e't's'n'i' ','d'e'n'e'p'p'a'h' 't''''''''n'e'v'e' 't's'a'p' 'e'g'r'a'l' 'a' 'n'e'h'W' ' hour in their implementation.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '.'n'o'i't'a't'n'e'm'e'l'p'm'i' 'r'i'e'h't'''''''''m'i' 'r'e'i'h't' 'n'i' 'r'u'o'h' 'r'u'e't'a'm'a' 's'a'w' 't'i' 'e'k'i'l' 'd'e'm'e'e's' 't'i' 'd'n''''d'a' 'k'o'o'l' 'r'e's'o'l'c' 'a' 'k'o'o't' 'I''''''''' 'y'l'i'k'c'u'L'''''o'l' 'I'n'n'?'n'o' 'g'n'i'o'g' 's'a'w' 't'a'h'W' '.'s't'n'e'v'e' 'e't's'a'p' 'e'g'r'a'l' 's's'e'c'o'r'p' 'o't' 's'd'n'o'c'e's' '3' 'e'k'a't' 't'''n'd'i'd' 't'c'a'f' 'a' 'r'o'f' 'w'e'n'k' 'I' 'm'h't'i'r'o'g'l'a' 'e'h'T' '.''l'e'W'i'Y' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''e'v'a'W' 'e'l'g'o'o'G' 'r'o'f' 'd'e's'u' 'e'w' 'm'h't'i'r'o'g'l'a' 'e'h'T' '.'''' '''''''''''''''''''''''''''''''l''''''''''''''''''''''''''''''''''''''''' And'''''t'u'B' '''A' '.''''''''''''s'd'n'o'c'e's' '3'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''s'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''S'J''''D'e'r'a'h'S' 'r'o'f' 'g'n'i's'u' 's'a'w' 'I' 'm'h't'i'r'o'g'l'a' 'e'h't' 's'a'w' 't'i' 't'u'b' '-' 't'i' 't'n'e'v'n'i' 't'''n'd'i'd' 'I' ','l'l'e'W' '.'e'n'i'M''''I' '?'t'a'h't' 's'a'w' 'm'h't'i'r'o'g'l'a' 'h'c'i'h'W'n'n''n'o'i's''''''''''n'o'i's'e's' 'g'n'i't'i'd'e' 'd'l'r'o'w' 'l'a'e'r' 'r'i'e'h't' 'f'o' 'e'n'o' 'm'o'r'f' '''0'''''''''''''' 's's'e'c'''o'r'p''''''''''''''''''''''''''''''''''''''.'n'o'i't'a'r'e'p'o' 'e't's'a'p'+'y'p'o'c' 'e'l'p'm'i's' 'a' 'e'l'd'n'a'h' 'o't''' 's''''x'm'0'3' 'f'o' 's'd'r'a'w'p'u' 'k'o'o't' ''''''''''''''''s'r'e'h't'o' 'd'n'A' '.'l'l'e'w' 'y'l'b'a'n'o's'a'e'r' 'd'e'k'r'o'w' 's'm'h't'i''''t'r'o'g''''''''''i'r'o'l'a' 'e'm'o'S' '''n'n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''f'''''''t' 'o' 'e'n'o' 'g'n'i's'u' ')'g'n'i't'i'd''''''''''''''''t'n'i'd'i'e' 'e'v'i't'a'r'o'b'''''''o'b'a'l'l'o'c' 'r'o'f' 'y'r'a'r'b'i'l' 't'p'i'r'c's'a'v'a'j' 'a'(' 'S'J'e'r'a'h'S' 'g'n'i't'n'e'm'e'l'p'm'i'e'r' 'p'e'e'd' 'e'e'n'k' 's'a'w' 'I' 'd'n'a' 'e'r'o'f'e'b'''''''b'a' 's'r'a'e'y' 'w'e'f' 'a' 'e'v'a'W' 'e'l'g'o'o'G' 'n'o' 'g'n'i'k'r'o'w' 'd'e'p'p'o't's' 'd'''I' '''''''''''''''f'o'h'c'n'u'''''''''''''''''''''''''''''''''''''''''''''''''''''t'h'g'u'o'h't' 'I' 't'a'h'w' 'g'n'i'k's'a' 'r'e'p'a'p' 'e'h't' 'o't' 's''''e'k'n'i'l' 'e'm' 't'n'e's' 'l'l'a' ''b' 'A''''''''''''''''''''''w'e'n'k' 'I' 'e'l'p'o'e'p' 'f'o' 's't'o'L'''''''''''''''''''' 'e'd'a'm' 'r'e'p'a'p' 'r'i'e'h'T' ''l'a' ''.'m'e'h't' 'd'e''''s'k'r'a'm'h'c'n'e'b' 'y'e'h't' 'd'n'a' ','g'n'i't'i'd'e' 't'n'e'r'r'u'c'n'o'c' 'r'o'f' 'w'o'l'l'a' 'o't' 'd'e't'n'e'm'e'l'p'm'i' 'e'b' 'd'l'u'o'c' 's'm'h't'i'r'o'g'l'a' 'T'O' 'd'n'a' 'T'D'R'C''''o' 's'y'a'w' 'f'o' 's't'o'l' 'g'n'i'w'o'h's' ''''''''n'o's'i'r'a'm'o'c' 'a' 'r'e'h't'e'g'o't' 't'u'p' 'e'c'n'a'r'F' 'n'i' 's'r'e'h'c'r'a'e''''''''''a'r'e's'e'r'''''''''''''''''''''' 'n'i' 's't'n'e'd'u't's' 'e't'a'u'd'a'r'g' 'e'm'o'S' '.'r'e'p'a'p' 'c'i'm'e'd'a'c'a' 'n'a' 'y'b' 'd'e'r'e'h't'o'b' 'y'l'l'a'e'r' 's'a'w' 'I' 'o'g'a' 's'r'a'e'y' 'w'e'f' 'A'''''n'n'n'n''Automerge is too slow and clunky. Martin (its principle architect and programmer) recorded himself typing an academic paper. Running his editing history through automerge (his own code) takes 490 seconds, which is a bit less than 10 minutes. Once processed, the editing trace sits on 1.1 GB of RAM. The newly merged performance branch (designed to fix a lot of these problems) is even slower - taking 750 seconds (12.5 minutes) to process the same editing trace.nI managed to get that 10 minute time down to 70ms (0.07 seconds). Thats the best result I've ever gotten from optimization work, and I'm delighted by it. Let me tell you what I did!nWhat does automerge do?nBefore we can go into detail about how I made automerge fast, we have to spend a moment talking about how automerge itself works.nAn automerge document is actually a tree of inserted characters. Each character in the document has the following properties:nA unique ID, made up of a tuple of (client ID, sequence number)nThe ID (or a pointer to) its parent item, which is the item directly before that character when it was inserted.nThe character itself ('A')nThere's a couple more fields (eg to mark when characters have been deleted), but essentially thats it. When a character is inserted in the document, automerge figures out the ID of the character immediately before the new character, and inserts the new character as one of its predecessor's *children*. If you just type a linear sequence of characters (as I'm doing right now), you'll end up with a big long chain of characters going down like a linked list.nSo why is automerge so slow?nWhen optimizing, I imagine myself manually doing all the work the computer is doing, one step at a time. Then I imagine asking: 'When I get bored, how would I speed this job up?'.nAutomerge is slow for 3 main reasons:nIts written in javascript and uses complex data structures. Javascript is reasonably fast for math, but slow and inefficient when using complex data structures.nAutomerge uses a complex and inefficient data structurenAutomerge makes extremely heavy use of immutablejsnEach of these issues accounts for about an order of magnitude slowdown in performance. You can see all 3 issues showing up in this method from the automerge source tree, which is called on each keystroke. Automerge uses this method to figure out where each new character should be placed in the resulting document:nfunction insertionsAfter(opSet, objectId, parentId, childId) {n let childKey = nulln if (childId) childKey = Map({opId: childId})nn return opSetn .getIn(['byObject', objectId, '_following', parentId], List())n .filter(op => op.get('insert') && (!childKey || lamportCompare(op, childKey) < 0))n .sort(lamportCompare)n .reverse() // descending ordern .map(op => op.get('opId'))n}nWhats wrong with this method?nThis method allocates all over the place. I can spot 5 allocations, not counting any extra nonsense immutablejs is doing. The call to List() has no effect as far as I can tell from reading immutablejs's documentation.nThe document is always kept in a sorted order anyway, so the calls to sort() and reverse() are unnecessary. The algorithm only needs to figure out where the new child should be inserted. Re-sorting all children is entirely avoidable. Sort functions are often fast when the input is sorted already, but in this case because the sorting function is inverted, the computer always has to sort the entire list.nYou can't tell from looking at this method, but insertionsAfter nDespite CRDTs being the 'new hotness' in the collaborative editing game for years, I've been resisting them. As I said in my [recent blog post about CRDTs](https://josephg.com/blog/crdts-are-the-future/), they've been generally unworkable for real world collaborative editing because:nThey take up too much space on disk and in memory. (Automerge takes 1.1GB in RAM to store a 100kb document)nThey consume way too much CPU to process editsnUntil these issues are addressed, I can't recommend CRDTs for use in general computing.n'