https://jingling.im/posts/copyonwritearrayset-source-code-analysis/