Home

Awesome

CRDT benchmarks

A collection of reproducible benchmarks. PRs are welcome.

# Install Node.js https://nodejs.org
npm i
# Run all benchmarks (takes quite a long time)
npm start
# Run all benchmarks using bun
npm start:bun
# Run a specific benchmark (e.g. yjs)
cd benchmarks/yjs && npm start
# Run a specific benchmark in the browser
cd benchmarks/yjs && npm start:browser
# print collected results
npm run table

Benchmarks

B1: No conflicts

Simulate two clients. One client modifies a text object and sends update messages to the other client. We measure the time to perform the task (time), the amount of data exchanged (avgUpdateSize), the size of the encoded document after the task is performed (docSize), the time to parse the encoded document (parseTime), and the memory used to hold the decoded document (memUsed).

B2: Two users producing conflicts

Simulate two clients. Both start with a synced text object containing 100 characters. Both clients modify the text object in a single transaction and then send their changes to the other client. We measure the time to sync concurrent changes into a single client (time), the size of the update messages (updateSize), the size of the encoded document after the task is performed (docSize), the time to parse the encoded document (parseTime), and the memory used to hold the decoded document (memUsed).

B3: Many conflicts

Simulate √N concurrent actions. We measure the time to perform the task and sync all clients (time), the size of the update messages (updateSize), the size of the encoded document after the task is performed (docSize), the time to parse the encoded document (parseTime), and the memory used to hold the decoded document (memUsed). The logarithm of N was chosen because √N concurrent actions may result in up to √N^2 - 1 conflicts (apply action 1: 0 conlict; apply action2: 1 conflict, apply action 2: 2 conflicts, ..).

B4: Real-world editing dataset

Replay a real-world editing dataset. This dataset contains the character-by-character editing trace of a large-ish text document, the LaTeX source of this paper: https://arxiv.org/abs/1608.03960

Source: https://github.com/automerge/automerge-perf/tree/master/edit-by-index

We simulate one client replaying all changes and storing each update. We measure the time to replay the changes and extract the content (time), the size of all update messages (updateSize), the size of the encoded document after the task is performed (docSize), the time to encode the document (encodeTime), the time to parse the encoded document and extract the content (parseTime), and the memory used to hold the decoded document in memory (memUsed).

** For now we replay all actions in a single transaction, otherwise Automerge is running out of memory.

[B4 x 100] Real-world editing dataset 100 times

Replay the [B4] dataset one hundred times. The final document has a size of over 10 million characters. As comparison, the book "Game of Thrones: A Song of Ice and Fire" is only 1.6 million characters long (including whitespace).

Results

Notes

N = 6000yjsywasmloroautomerge
Version13.6.110.9.30.10.12.1.10
Bundle size69,124 bytes677,667 bytes1,052,250 bytes1,737,571 bytes
Bundle size (gzipped)20,100 bytes213,833 bytes399,276 bytes604,118 bytes
[B1.1] Append N characters (time)188 ms154 ms120 ms365 ms
[B1.1] Append N characters (avgUpdateSize)27 bytes27 bytes109 bytes121 bytes
[B1.1] Append N characters (encodeTime)1 ms1 ms1 ms7 ms
[B1.1] Append N characters (docSize)6,031 bytes6,031 bytes6,162 bytes3,992 bytes
[B1.1] Append N characters (memUsed)0 B0 B0 B0 B
[B1.1] Append N characters (parseTime)32 ms23 ms26 ms80 ms
[B1.2] Insert string of length N (time)0 ms0 ms0 ms9 ms
[B1.2] Insert string of length N (avgUpdateSize)6,031 bytes6,031 bytes6,107 bytes6,201 bytes
[B1.2] Insert string of length N (encodeTime)0 ms0 ms0 ms3 ms
[B1.2] Insert string of length N (docSize)6,031 bytes6,031 bytes6,117 bytes3,974 bytes
[B1.2] Insert string of length N (memUsed)17.4 kB0 B0 B8.8 kB
[B1.2] Insert string of length N (parseTime)27 ms34 ms29 ms47 ms
[B1.3] Prepend N characters (time)119 ms23 ms81 ms307 ms
[B1.3] Prepend N characters (avgUpdateSize)27 bytes27 bytes108 bytes116 bytes
[B1.3] Prepend N characters (encodeTime)3 ms0 ms10 ms5 ms
[B1.3] Prepend N characters (docSize)6,041 bytes6,041 bytes12,125 bytes3,988 bytes
[B1.3] Prepend N characters (memUsed)919.9 kB8.3 kB26.3 kB0 B
[B1.3] Prepend N characters (parseTime)93 ms31 ms26 ms63 ms
[B1.4] Insert N characters at random positions (time)131 ms128 ms79 ms310 ms
[B1.4] Insert N characters at random positions (avgUpdateSize)29 bytes29 bytes109 bytes121 bytes
[B1.4] Insert N characters at random positions (encodeTime)1 ms1 ms35 ms8 ms
[B1.4] Insert N characters at random positions (docSize)29,554 bytes29,554 bytes35,401 bytes24,743 bytes
[B1.4] Insert N characters at random positions (memUsed)883.6 kB0 B0 B9 kB
[B1.4] Insert N characters at random positions (parseTime)76 ms29 ms31 ms79 ms
[B1.5] Insert N words at random positions (time)154 ms449 ms82 ms449 ms
[B1.5] Insert N words at random positions (avgUpdateSize)36 bytes36 bytes117 bytes131 bytes
[B1.5] Insert N words at random positions (encodeTime)5 ms1 ms69 ms21 ms
[B1.5] Insert N words at random positions (docSize)87,924 bytes87,924 bytes94,524 bytes96,203 bytes
[B1.5] Insert N words at random positions (memUsed)2.3 MB872 B2.1 kB0 B
[B1.5] Insert N words at random positions (parseTime)92 ms34 ms31 ms143 ms
[B1.6] Insert string, then delete it (time)1 ms1 ms2 ms22 ms
[B1.6] Insert string, then delete it (avgUpdateSize)6,053 bytes6,053 bytes6,217 bytes6,338 bytes
[B1.6] Insert string, then delete it (encodeTime)0 ms0 ms0 ms3 ms
[B1.6] Insert string, then delete it (docSize)38 bytes38 bytes6,120 bytes3,993 bytes
[B1.6] Insert string, then delete it (memUsed)0 B0 B0 B2 kB
[B1.6] Insert string, then delete it (parseTime)44 ms28 ms27 ms37 ms
[B1.7] Insert/Delete strings at random positions (time)158 ms141 ms98 ms389 ms
[B1.7] Insert/Delete strings at random positions (avgUpdateSize)31 bytes31 bytes113 bytes135 bytes
[B1.7] Insert/Delete strings at random positions (encodeTime)8 ms1 ms17 ms19 ms
[B1.7] Insert/Delete strings at random positions (docSize)28,377 bytes28,377 bytes50,836 bytes59,281 bytes
[B1.7] Insert/Delete strings at random positions (memUsed)1.4 MB632 B1.8 kB6 kB
[B1.7] Insert/Delete strings at random positions (parseTime)117 ms31 ms25 ms111 ms
[B1.8] Append N numbers (time)148 ms29 ms81 ms480 ms
[B1.8] Append N numbers (avgUpdateSize)32 bytes32 bytes114 bytes125 bytes
[B1.8] Append N numbers (encodeTime)0 ms0 ms1 ms8 ms
[B1.8] Append N numbers (docSize)35,634 bytes35,634 bytes35,719 bytes26,985 bytes
[B1.8] Append N numbers (memUsed)0 B0 B0 B61.3 kB
[B1.8] Append N numbers (parseTime)36 ms31 ms27 ms80 ms
[B1.9] Insert Array of N numbers (time)1 ms2 ms9 ms38 ms
[B1.9] Insert Array of N numbers (avgUpdateSize)35,657 bytes35,657 bytes35,735 bytes31,199 bytes
[B1.9] Insert Array of N numbers (encodeTime)1 ms0 ms1 ms5 ms
[B1.9] Insert Array of N numbers (docSize)35,657 bytes35,657 bytes35,742 bytes26,953 bytes
[B1.9] Insert Array of N numbers (memUsed)39.3 kB608 B2.4 kB61.6 kB
[B1.9] Insert Array of N numbers (parseTime)33 ms26 ms22 ms53 ms
[B1.10] Prepend N numbers (time)122 ms28 ms78 ms461 ms
[B1.10] Prepend N numbers (avgUpdateSize)32 bytes36 bytes113 bytes120 bytes
[B1.10] Prepend N numbers (encodeTime)3 ms1 ms10 ms7 ms
[B1.10] Prepend N numbers (docSize)35,665 bytes65,658 bytes41,748 bytes26,987 bytes
[B1.10] Prepend N numbers (memUsed)1.8 MB168 kB119.5 kB61.5 kB
[B1.10] Prepend N numbers (parseTime)96 ms31 ms32 ms77 ms
[B1.11] Insert N numbers at random positions (time)134 ms144 ms78 ms433 ms
[B1.11] Insert N numbers at random positions (avgUpdateSize)33 bytes34 bytes114 bytes125 bytes
[B1.11] Insert N numbers at random positions (encodeTime)1 ms1 ms37 ms9 ms
[B1.11] Insert N numbers at random positions (docSize)59,136 bytes59,152 bytes65,016 bytes47,746 bytes
[B1.11] Insert N numbers at random positions (memUsed)1.8 MB0 B0 B61.7 kB
[B1.11] Insert N numbers at random positions (parseTime)80 ms34 ms36 ms93 ms
[B2.1] Concurrently insert string of length N at index 0 (time)1 ms0 ms2 ms62 ms
[B2.1] Concurrently insert string of length N at index 0 (updateSize)6,094 bytes6,094 bytes9,276 bytes9,499 bytes
[B2.1] Concurrently insert string of length N at index 0 (encodeTime)0 ms0 ms0 ms5 ms
[B2.1] Concurrently insert string of length N at index 0 (docSize)12,152 bytes12,151 bytes12,248 bytes8,011 bytes
[B2.1] Concurrently insert string of length N at index 0 (memUsed)0 B592 B6.4 kB14.5 kB
[B2.1] Concurrently insert string of length N at index 0 (parseTime)43 ms27 ms25 ms47 ms
[B2.2] Concurrently insert N characters at random positions (time)65 ms365 ms83 ms287 ms
[B2.2] Concurrently insert N characters at random positions (updateSize)33,444 bytes177,007 bytes35,554 bytes27,476 bytes
[B2.2] Concurrently insert N characters at random positions (encodeTime)2 ms1 ms82 ms9 ms
[B2.2] Concurrently insert N characters at random positions (docSize)66,852 bytes66,860 bytes71,858 bytes50,683 bytes
[B2.2] Concurrently insert N characters at random positions (memUsed)2.4 MB392 B1.8 kB0 B
[B2.2] Concurrently insert N characters at random positions (parseTime)101 ms34 ms30 ms53 ms
[B2.3] Concurrently insert N words at random positions (time)85 ms1,014 ms112 ms663 ms
[B2.3] Concurrently insert N words at random positions (updateSize)88,994 bytes215,213 bytes93,132 bytes122,485 bytes
[B2.3] Concurrently insert N words at random positions (encodeTime)4 ms4 ms145 ms38 ms
[B2.3] Concurrently insert N words at random positions (docSize)178,137 bytes178,130 bytes188,458 bytes185,019 bytes
[B2.3] Concurrently insert N words at random positions (memUsed)5.5 MB0 B1.5 kB0 B
[B2.3] Concurrently insert N words at random positions (parseTime)85 ms71 ms52 ms168 ms
[B2.4] Concurrently insert & delete (time)178 ms2,786 ms208 ms1,066 ms
[B2.4] Concurrently insert & delete (updateSize)139,517 bytes398,881 bytes163,564 bytes298,810 bytes
[B2.4] Concurrently insert & delete (encodeTime)12 ms6 ms233 ms62 ms
[B2.4] Concurrently insert & delete (docSize)279,172 bytes279,166 bytes289,590 bytes293,828 bytes
[B2.4] Concurrently insert & delete (memUsed)8.2 MB0 B1.8 kB0 B
[B2.4] Concurrently insert & delete (parseTime)121 ms78 ms50 ms255 ms
[B3.1] 20√N clients concurrently set number in Map (time)75 ms290 ms56 ms1,632 ms
[B3.1] 20√N clients concurrently set number in Map (updateSize)49,169 bytes49,169 bytes161,636 bytes283,296 bytes
[B3.1] 20√N clients concurrently set number in Map (encodeTime)2 ms1 ms2 ms11 ms
[B3.1] 20√N clients concurrently set number in Map (docSize)32,225 bytes32,209 bytes21,506 bytes86,167 bytes
[B3.1] 20√N clients concurrently set number in Map (memUsed)0 B176 B824 B344 B
[B3.1] 20√N clients concurrently set number in Map (parseTime)104 ms70 ms40 ms37 ms
[B3.2] 20√N clients concurrently set Object in Map (time)84 ms278 ms67 ms1,726 ms
[B3.2] 20√N clients concurrently set Object in Map (updateSize)85,082 bytes85,085 bytes200,630 bytes398,090 bytes
[B3.2] 20√N clients concurrently set Object in Map (encodeTime)3 ms2 ms2 ms30 ms
[B3.2] 20√N clients concurrently set Object in Map (docSize)32,235 bytes32,249 bytes40,494 bytes112,570 bytes
[B3.2] 20√N clients concurrently set Object in Map (memUsed)0 B0 B136 B0 B
[B3.2] 20√N clients concurrently set Object in Map (parseTime)102 ms70 ms45 ms86 ms
[B3.3] 20√N clients concurrently set String in Map (time)86 ms299 ms116 ms2,335 ms
[B3.3] 20√N clients concurrently set String in Map (updateSize)7,826,222 bytes7,826,231 bytes7,940,240 bytes8,063,440 bytes
[B3.3] 20√N clients concurrently set String in Map (encodeTime)2 ms1 ms46 ms91 ms
[B3.3] 20√N clients concurrently set String in Map (docSize)38,357 bytes38,376 bytes7,798,572 bytes98,047 bytes
[B3.3] 20√N clients concurrently set String in Map (memUsed)243 kB0 B696 B0 B
[B3.3] 20√N clients concurrently set String in Map (parseTime)97 ms52 ms55 ms118 ms
[B3.4] 20√N clients concurrently insert text in Array (time)72 ms283 ms227 ms2,780 ms
[B3.4] 20√N clients concurrently insert text in Array (updateSize)52,738 bytes52,751 bytes166,750 bytes311,830 bytes
[B3.4] 20√N clients concurrently insert text in Array (encodeTime)2 ms1 ms8 ms17 ms
[B3.4] 20√N clients concurrently insert text in Array (docSize)26,583 bytes26,596 bytes31,119 bytes96,463 bytes
[B3.4] 20√N clients concurrently insert text in Array (memUsed)588.8 kB0 B480 B0 B
[B3.4] 20√N clients concurrently insert text in Array (parseTime)84 ms60 ms29 ms42 ms
[B4] Apply real-world editing dataset (time)5,714 ms28,675 ms3,089 ms14,326 ms
[B4] Apply real-world editing dataset (encodeTime)11 ms3 ms77 ms185 ms
[B4] Apply real-world editing dataset (docSize)159,929 bytes159,929 bytes258,228 bytes129,116 bytes
[B4] Apply real-world editing dataset (parseTime)39 ms16 ms13 ms1,805 ms
[B4] Apply real-world editing dataset (memUsed)3.2 MB0 B0 B0 B
[B4x100] Apply real-world editing dataset 100 times (time)608,908 ms2,829,633 ms309,689 msskipped
[B4x100] Apply real-world editing dataset 100 times (encodeTime)365 ms186 ms14,429 msskipped
[B4x100] Apply real-world editing dataset 100 times (docSize)15,989,244 bytes15,989,245 bytes25,805,795 bytesskipped
[B4x100] Apply real-world editing dataset 100 times (parseTime)2,622 ms1,328 ms1,304 msskipped
[B4x100] Apply real-world editing dataset 100 times (memUsed)327.1 MB24 B2.1 kBskipped
Older benchmark results that include automerge & delta-crdts
N = 6000YjsAutomergedelta-crdts
Version13.3.00.14.10.10.3
Bundle size65923 bytes259763 bytes227573 bytes
Bundle size (gzipped)19377 bytes61478 bytes64388 bytes
[B1.1] Append N characters (time)303 ms2460 ms9595 ms
[B1.1] Append N characters (avgUpdateSize)27 bytes326 bytes46 bytes
[B1.1] Append N characters (docSize)6031 bytes2161851 bytes186031 bytes
[B1.1] Append N characters (memUsed)372.1 kB74.7 MB2.4 MB
[B1.1] Append N characters (parseTime)18 ms737 ms48 ms
[B1.2] Insert string of length N (time)7 ms2981 ms9592 ms
[B1.2] Insert string of length N (avgUpdateSize)6031 bytes1484719 bytes275992 bytes
[B1.2] Insert string of length N (docSize)6031 bytes1569051 bytes186031 bytes
[B1.2] Insert string of length N (memUsed)0 B53.3 MB2 MB
[B1.2] Insert string of length N (parseTime)19 ms516 ms44 ms
[B1.3] Prepend N characters (time)280 ms83488 ms8932 ms
[B1.3] Prepend N characters (avgUpdateSize)27 bytes290 bytes38 bytes
[B1.3] Prepend N characters (docSize)6041 bytes1946994 bytes186031 bytes
[B1.3] Prepend N characters (memUsed)3.7 MB67.6 MB1.8 MB
[B1.3] Prepend N characters (parseTime)55 ms83509 ms884 ms
[B1.4] Insert N characters at random positions (time)311 ms3255 ms9487 ms
[B1.4] Insert N characters at random positions (avgUpdateSize)29 bytes326 bytes46 bytes
[B1.4] Insert N characters at random positions (docSize)29614 bytes2159192 bytes186031 bytes
[B1.4] Insert N characters at random positions (memUsed)3.4 MB71 MB1.6 MB
[B1.4] Insert N characters at random positions (parseTime)57 ms1215 ms728 ms
[B1.5] Insert N words at random positions (time)376 ms12090 ms471437 ms
[B1.5] Insert N words at random positions (avgUpdateSize)36 bytes1587 bytes277 bytes
[B1.5] Insert N words at random positions (docSize)87826 bytes10148335 bytes1122045 bytes
[B1.5] Insert N words at random positions (memUsed)7.6 MB330.9 MB16.2 MB
[B1.5] Insert N words at random positions (parseTime)65 ms4106 ms8509 ms
[B1.6] Insert string, then delete it (time)6 ms2715 ms31058 ms
[B1.6] Insert string, then delete it (avgUpdateSize)6053 bytes1412719 bytes413992 bytes
[B1.6] Insert string, then delete it (docSize)38 bytes1497051 bytes240035 bytes
[B1.6] Insert string, then delete it (memUsed)0 B37.7 MB0 B
[B1.6] Insert string, then delete it (parseTime)27 ms335 ms57 ms
[B1.7] Insert/Delete strings at random positions (time)378 ms6347 ms218372 ms
[B1.7] Insert/Delete strings at random positions (avgUpdateSize)31 bytes1102 bytes195 bytes
[B1.7] Insert/Delete strings at random positions (docSize)28691 bytes7085598 bytes687945 bytes
[B1.7] Insert/Delete strings at random positions (memUsed)4.4 MB163.8 MB9.4 MB
[B1.7] Insert/Delete strings at random positions (parseTime)51 ms2351 ms1648 ms
[B1.8] Append N numbers (time)330 ms2913 ms10309 ms
[B1.8] Append N numbers (avgUpdateSize)32 bytes333 bytes48 bytes
[B1.8] Append N numbers (docSize)35634 bytes2200659 bytes204029 bytes
[B1.8] Append N numbers (memUsed)0 B73.6 MB1.9 MB
[B1.8] Append N numbers (parseTime)19 ms671 ms42 ms
[B1.9] Insert Array of N numbers (time)14 ms3223 ms10157 ms
[B1.9] Insert Array of N numbers (avgUpdateSize)35661 bytes1523693 bytes48 bytes
[B1.9] Insert Array of N numbers (docSize)35661 bytes1608026 bytes204031 bytes
[B1.9] Insert Array of N numbers (memUsed)0 B53.3 MB2.1 MB
[B1.9] Insert Array of N numbers (parseTime)20 ms613 ms39 ms
[B1.10] Prepend N numbers (time)271 ms62982 ms9121 ms
[B1.10] Prepend N numbers (avgUpdateSize)32 bytes297 bytes40 bytes
[B1.10] Prepend N numbers (docSize)35669 bytes1985894 bytes204031 bytes
[B1.10] Prepend N numbers (memUsed)7.1 MB67.3 MB1.9 MB
[B1.10] Prepend N numbers (parseTime)49 ms60077 ms933 ms
[B1.11] Insert N numbers at random positions (time)296 ms3844 ms9892 ms
[B1.11] Insert N numbers at random positions (avgUpdateSize)34 bytes332 bytes48 bytes
[B1.11] Insert N numbers at random positions (docSize)59161 bytes2198120 bytes204029 bytes
[B1.11] Insert N numbers at random positions (memUsed)7.5 MB70.1 MB1.9 MB
[B1.11] Insert N numbers at random positions (parseTime)51 ms1116 ms682 ms
[B2.1] Concurrently insert string of length N at index 0 (time)3 ms5729 ms39820 ms
[B2.1] Concurrently insert string of length N at index 0 (updateSize)12058 bytes2970726 bytes551984 bytes
[B2.1] Concurrently insert string of length N at index 0 (docSize)12149 bytes3164619 bytes375131 bytes
[B2.1] Concurrently insert string of length N at index 0 (memUsed)0 B107.8 MB5.1 MB
[B2.1] Concurrently insert string of length N at index 0 (parseTime)20 ms912 ms70 ms
[B2.2] Concurrently insert N characters at random positions (time)143 ms53873 ms38517 ms
[B2.2] Concurrently insert N characters at random positions (updateSize)66360 bytes2753229 bytes551912 bytes
[B2.2] Concurrently insert N characters at random positions (docSize)66454 bytes2947122 bytes375131 bytes
[B2.2] Concurrently insert N characters at random positions (memUsed)7.3 MB98.2 MB5.2 MB
[B2.2] Concurrently insert N characters at random positions (parseTime)59 ms60674 ms2740 ms
[B2.3] Concurrently insert N words at random positions (time)228 ms309114 ms2280822 ms
[B2.3] Concurrently insert N words at random positions (updateSize)177753 bytes17696052 bytes3295776 bytes
[B2.3] Concurrently insert N words at random positions (docSize)177918 bytes18725017 bytes2224223 bytes
[B2.3] Concurrently insert N words at random positions (memUsed)15.3 MB619.6 MB39.8 MB
[B2.3] Concurrently insert N words at random positions (parseTime)81 ms139273 ms41511 ms
[B2.4] Concurrently insert & delete (time)408 ms518020 ms3058659 ms
[B2.4] Concurrently insert & delete (updateSize)278025 bytes26580311 bytes5560784 bytes
[B2.4] Concurrently insert & delete (docSize)278153 bytes28112800 bytes3607213 bytes
[B2.4] Concurrently insert & delete (memUsed)19.4 MB850 MB38.1 MB
[B2.4] Concurrently insert & delete (parseTime)120 ms19810 ms64675 ms
[B3.1] 20√N clients concurrently set number in Map (time)551 ms7643 ms
[B3.1] 20√N clients concurrently set number in Map (updateSize)49168 bytes246830 bytes
[B3.1] 20√N clients concurrently set number in Map (docSize)32213 bytes288422 bytes
[B3.1] 20√N clients concurrently set number in Map (memUsed)3.6 MB30.9 MB
[B3.1] 20√N clients concurrently set number in Map (parseTime)54 ms6067 ms
[B3.2] 20√N clients concurrently set Object in Map (time)711 ms39655 ms
[B3.2] 20√N clients concurrently set Object in Map (updateSize)95864 bytes684190 bytes
[B3.2] 20√N clients concurrently set Object in Map (docSize)41477 bytes758122 bytes
[B3.2] 20√N clients concurrently set Object in Map (memUsed)7 MB64.9 MB
[B3.2] 20√N clients concurrently set Object in Map (parseTime)54 ms14129 ms
[B3.3] 20√N clients concurrently set String in Map (time)790 ms9342 ms
[B3.3] 20√N clients concurrently set String in Map (updateSize)7826229 bytes8021860 bytes
[B3.3] 20√N clients concurrently set String in Map (docSize)38360 bytes8063452 bytes
[B3.3] 20√N clients concurrently set String in Map (memUsed)13.1 MB77.9 MB
[B3.3] 20√N clients concurrently set String in Map (parseTime)49 ms7670 ms
[B3.4] 20√N clients concurrently insert text in Array (time)596 ms21964 ms2063 ms
[B3.4] 20√N clients concurrently insert text in Array (updateSize)52746 bytes499350 bytes65810 bytes
[B3.4] 20√N clients concurrently insert text in Array (docSize)26591 bytes552023 bytes57757 bytes
[B3.4] 20√N clients concurrently insert text in Array (memUsed)6.8 MB59.5 MB4.4 MB
[B3.4] 20√N clients concurrently insert text in Array (parseTime)32 ms44967 ms2078 ms
[B4] Apply real-world editing dataset (time)6342 ms489104 ms20134540 ms
[B4] Apply real-world editing dataset (avgUpdateSize)29 bytes291 bytes45 bytes
[B4] Apply real-world editing dataset (encodeTime)27 ms2611 ms814 ms
[B4] Apply real-world editing dataset (docSize)159929 bytes83966886 bytes7888799 bytes
[B4] Apply real-world editing dataset (memUsed)3.2 MB1.1 GB34.4 MB
[B4] Apply real-world editing dataset (parseTime)86 ms37844 ms51991 ms
[B4 x 100] Apply real-world editing dataset 100 times (time)170254 ms
[B4 x 100] Apply real-world editing dataset 100 times (encodeTime)645 ms
[B4 x 100] Apply real-world editing dataset 100 times (docSize)15989245 bytes
[B4 x 100] Apply real-world editing dataset 100 times (parseTime)1792 ms
[B4 x 100] Apply real-world editing dataset 100 times (memUsed)266.4 MB
N = 60000Yjsautomerge
Bundle size65939 bytes259763 bytes
Bundle size (gzipped)19383 bytes61478 bytes
[B1.1] Append N characters (time)1582 ms
[B1.1] Append N characters (avgUpdateSize)29 bytes
[B1.1] Append N characters (docSize)60034 bytes
[B1.1] Append N characters (parseTime)1 ms
[B1.1] Append N characters (memUsed)16.3 MB
[B1.1] Append N charactersskipping
[B1.2] Insert string of length N (time)8 ms
[B1.2] Insert string of length N (avgUpdateSize)60034 bytes
[B1.2] Insert string of length N (docSize)60034 bytes
[B1.2] Insert string of length N (parseTime)1 ms
[B1.2] Insert string of length N (memUsed)1.8 MB
[B1.2] Insert string of length Nskipping
[B1.3] Prepend N characters (time)1229 ms
[B1.3] Prepend N characters (avgUpdateSize)29 bytes
[B1.3] Prepend N characters (docSize)60047 bytes
[B1.3] Prepend N characters (parseTime)45 ms
[B1.3] Prepend N characters (memUsed)35.2 MB
[B1.3] Prepend N charactersskipping
[B1.4] Insert N characters at random positions (time)1801 ms
[B1.4] Insert N characters at random positions (avgUpdateSize)31 bytes
[B1.4] Insert N characters at random positions (docSize)374543 bytes
[B1.4] Insert N characters at random positions (parseTime)53 ms
[B1.4] Insert N characters at random positions (memUsed)48.9 MB
[B1.4] Insert N characters at random positionsskipping
[B1.5] Insert N words at random positions (time)5711 ms
[B1.5] Insert N words at random positions (avgUpdateSize)36 bytes
[B1.5] Insert N words at random positions (docSize)932585 bytes
[B1.5] Insert N words at random positions (parseTime)205 ms
[B1.5] Insert N words at random positions (memUsed)51.2 MB
[B1.5] Insert N words at random positionsskipping
[B1.6] Insert string, then delete it (time)7 ms
[B1.6] Insert string, then delete it (avgUpdateSize)60057 bytes
[B1.6] Insert string, then delete it (docSize)40 bytes
[B1.6] Insert string, then delete it (parseTime)0 ms
[B1.6] Insert string, then delete it (memUsed)924.7 kB
[B1.6] Insert string, then delete itskipping
[B1.7] Insert/Delete strings at random positions (time)4771 ms
[B1.7] Insert/Delete strings at random positions (avgUpdateSize)32 bytes
[B1.7] Insert/Delete strings at random positions (docSize)362959 bytes
[B1.7] Insert/Delete strings at random positions (parseTime)86 ms
[B1.7] Insert/Delete strings at random positions (memUsed)67.7 MB
[B1.7] Insert/Delete strings at random positionsskipping
[B1.8] Append N numbers (time)15069 ms
[B1.8] Append N numbers (avgUpdateSize)34 bytes
[B1.8] Append N numbers (docSize)356220 bytes
[B1.8] Append N numbers (parseTime)2 ms
[B1.8] Append N numbers (memUsed)19.5 MB
[B1.8] Append N numbersskipping
[B1.9] Insert Array of N numbers (time)6 ms
[B1.9] Insert Array of N numbers (avgUpdateSize)356278 bytes
[B1.9] Insert Array of N numbers (docSize)356278 bytes
[B1.9] Insert Array of N numbers (parseTime)2 ms
[B1.9] Insert Array of N numbers (memUsed)0 B
[B1.9] Insert Array of N numbersskipping
[B1.10] Prepend N numbers (time)1185 ms
[B1.10] Prepend N numbers (avgUpdateSize)34 bytes
[B1.10] Prepend N numbers (docSize)356347 bytes
[B1.10] Prepend N numbers (parseTime)29 ms
[B1.10] Prepend N numbers (memUsed)0 B
[B1.10] Prepend N numbersskipping
[B1.11] Insert N numbers at random positions (time)1901 ms
[B1.11] Insert N numbers at random positions (avgUpdateSize)36 bytes
[B1.11] Insert N numbers at random positions (docSize)670910 bytes
[B1.11] Insert N numbers at random positions (parseTime)52 ms
[B1.11] Insert N numbers at random positions (memUsed)84.5 MB
[B1.11] Insert N numbers at random positionsskipping
[B2.1] Concurrently insert string of length N at index 0 (time)5 ms
[B2.1] Concurrently insert string of length N at index 0 (updateSize)120064 bytes
[B2.1] Concurrently insert string of length N at index 0 (docSize)120154 bytes
[B2.1] Concurrently insert string of length N at index 0 (parseTime)2 ms
[B2.1] Concurrently insert string of length N at index 0 (memUsed)4.2 MB
[B2.1] Concurrently insert string of length N at index 0skipping
[B2.2] Concurrently insert N characters at random positions (time)1017 ms
[B2.2] Concurrently insert N characters at random positions (updateSize)760850 bytes
[B2.2] Concurrently insert N characters at random positions (docSize)760942 bytes
[B2.2] Concurrently insert N characters at random positions (parseTime)91 ms
[B2.2] Concurrently insert N characters at random positions (memUsed)0 B
[B2.2] Concurrently insert N characters at random positionsskipping
[B2.3] Concurrently insert N words at random positions (time)9163 ms
[B2.3] Concurrently insert N words at random positions (updateSize)1877355 bytes
[B2.3] Concurrently insert N words at random positions (docSize)1877486 bytes
[B2.3] Concurrently insert N words at random positions (parseTime)344 ms
[B2.3] Concurrently insert N words at random positions (memUsed)0 B
[B2.3] Concurrently insert N words at random positionsskipping
[B2.4] Concurrently insert & delete (time)18214 ms
[B2.4] Concurrently insert & delete (updateSize)2883749 bytes
[B2.4] Concurrently insert & delete (docSize)2883876 bytes
[B2.4] Concurrently insert & delete (parseTime)661 ms
[B2.4] Concurrently insert & delete (memUsed)258.2 MB
[B2.4] Concurrently insert & deleteskipping
[B3.1] √N clients concurrently set number in Map (time)20 ms
[B3.1] √N clients concurrently set number in Map (updateSize)7736 bytes
[B3.1] √N clients concurrently set number in Map (docSize)5121 bytes
[B3.1] √N clients concurrently set number in Map (parseTime)3 ms
[B3.1] √N clients concurrently set number in Map (memUsed)0 B
[B3.1] √N clients concurrently set number in Mapskipping
[B3.2] √N clients concurrently set Object in Map (time)29 ms
[B3.2] √N clients concurrently set Object in Map (updateSize)15011 bytes
[B3.2] √N clients concurrently set Object in Map (docSize)6612 bytes
[B3.2] √N clients concurrently set Object in Map (parseTime)2 ms
[B3.2] √N clients concurrently set Object in Map (memUsed)6.6 MB
[B3.2] √N clients concurrently set Object in Mapskipping
[B3.3] √N clients concurrently set String in Map (time)24 ms
[B3.3] √N clients concurrently set String in Map (updateSize)159565 bytes
[B3.3] √N clients concurrently set String in Map (docSize)5601 bytes
[B3.3] √N clients concurrently set String in Map (parseTime)3 ms
[B3.3] √N clients concurrently set String in Map (memUsed)6.4 MB
[B3.3] √N clients concurrently set String in Mapskipping
[B3.4] √N clients concurrently insert text in Array (time)20 ms
[B3.4] √N clients concurrently insert text in Array (updateSize)8185 bytes
[B3.4] √N clients concurrently insert text in Array (docSize)4062 bytes
[B3.4] √N clients concurrently insert text in Array (parseTime)0 ms
[B3.4] √N clients concurrently insert text in Array (memUsed)0 B
[B3.4] √N clients concurrently insert text in Arrayskipping
[B4] Apply real-world editing dataset (time)5238 ms
[B4] Apply real-world editing dataset (updateSize)7306126 bytes
[B4] Apply real-world editing dataset (encodeTime)13 ms
[B4] Apply real-world editing dataset (docSize)159927 bytes
[B4] Apply real-world editing dataset (parseTime)16 ms
[B4] Apply real-world editing dataset (memUsed)6.9 MB
[B4] Apply real-world editing datasetskipping
[B4 x 100] Apply real-world editing dataset 100 times (time)198383 ms
[B4 x 100] Apply real-world editing dataset 100 times (encodeTime)617 ms
[B4 x 100] Apply real-world editing dataset 100 times (docSize)15989245 bytes
[B4 x 100] Apply real-world editing dataset 100 times (parseTime)2127 ms
[B4 x 100] Apply real-world editing dataset 100 times (memUsed)165.5 MB

Development

Modify the N variable in benchmarks/utils.js to increase the difficulty.

License

The MIT License © Kevin Jahns

Except for /b4-editing-trace.js © Martin Kleppmann