@mathias is COW used after re-allocating the buffer for the array? Or is it used in a different context?
-
-
Replying to @svensauleau
COW is using the same backing store for multiple arrays that happen to hold the same elements. We only reallocate and copy once one of those arrays gets mutated.
1 reply 0 retweets 1 like
Replying to @mathias @svensauleau
Simplified example: const a = []; const b = []; const c = []; We could create 3 buffers in the backing store, but with COW we can just share a single one. a.push(42); Now the actual copy-on-write kicks in: we copy the shared buffer and then add the new element to the new copy
2:16 AM - 20 Apr 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.