Commit 46eeb46a authored by Milo Yip's avatar Milo Yip

Implemented faster itoa with bit counting and reverse write

parent 8b963dc7
......@@ -362,6 +362,7 @@ struct GenericInsituStringStream {
// Write
Ch* PutBegin() { return dst_ = src_; }
void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
Ch* Allocate(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }
void Flush() {}
size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment