4 ms·
I think (fuzzily), from what I can find, that string-stream.cc allocates a block of char's for a string. Once the string grows beyond the capacity, `char* HeapS
by shadytrees 18y ago
I think (fuzzily), from what I can find, that string-stream.cc allocates a block of char's for a string. Once the string grows beyond the capacity, `char* HeapStringAllocator::grow(unsigned* bytes)` doubles the size of the allocated buffer. Kind of disappointing after half an hour of reading and C-s'ing in Emacs.
`string.js` is used by `tools/js2c.py` to create a `string.h`, but otherwise I think many of the string functions are implemented in JavaScript and (I'm guessing) compiled later since `string.js` and other JavaScript files are referencing C macros.