December 2001
Intermediate to advanced
304 pages
6h 25m
English
This appendix contains supplementary details for Item 16 and Appendix A. The test harness source code can be downloaded via a link on this book's Web page at http://www.gotw.ca/publications/mxc++.htm, if you'd like to try it on your system.
To assess COW, I performed measurements of three kinds of functions:
Copying (where COW shines, its raison d'être)
Mutating operations that could trigger reallocation (represented by Append(), which gradually lengthens; this is to make sure any conclusions drawn can take into account periodic reallocation overhead due to normal string use)
Possibly-mutating operations that do not change length enough to trigger reallocation, ...
Read now
Unlock full access