diff --git a/doc/faq.md b/doc/faq.md index 753e34a..bab7f5f 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -216,7 +216,7 @@ 1. Who are the developers of RapidJSON? - Milo Yip ([@miloyip](https://github.com/miloyip)) is the original author of RapidJSON. Many contributors from the world have improved RapidJSON. Philipp A. Hartmann ([@pah](https://github.com/pah)) has implemented a lot of improvements, setting up automatic testing and also involves in a lot of discussions for the community. Don Ding ([@thebusytypist](https://github.com/thebusytypist)) implemented the iterative parser. Andrii Senkovych ([@jollyroger](https://github.com/jollyroger)) completed the CMake migration. Kosta ([@Kosta-Github](https://github.com/Kosta-Github)) provided a very neat short-string optimization. Thank you for all other contributors and community members as well. + Milo Yip ([miloyip](https://github.com/miloyip)) is the original author of RapidJSON. Many contributors from the world have improved RapidJSON. Philipp A. Hartmann ([pah](https://github.com/pah)) has implemented a lot of improvements, setting up automatic testing and also involves in a lot of discussions for the community. Don Ding ([thebusytypist](https://github.com/thebusytypist)) implemented the iterative parser. Andrii Senkovych ([jollyroger](https://github.com/jollyroger)) completed the CMake migration. Kosta ([Kosta-Github](https://github.com/Kosta-Github)) provided a very neat short-string optimization. Thank you for all other contributors and community members as well. 2. Why do you develop RapidJSON? diff --git a/doc/faq.zh-cn.md b/doc/faq.zh-cn.md index 26bbee7..ce6acf1 100644 --- a/doc/faq.zh-cn.md +++ b/doc/faq.zh-cn.md @@ -216,7 +216,7 @@ 1. 谁是RapidJSON的开发者? - 叶劲峰(Milo Yip,[@miloyip](https://github.com/miloyip))是RapidJSON的原作者。全世界许多贡献者一直在改善RapidJSON。Philipp A. Hartmann([@pah](https://github.com/pah))实现了许多改进,也设置了自动化测试,而且还参与许多社区讨论。丁欧南(Don Ding,[@thebusytypist](https://github.com/thebusytypist))实现了迭代式解析器。Andrii Senkovych([@jollyroger](https://github.com/jollyroger))完成了向CMake的迁移。Kosta([@Kosta-Github](https://github.com/Kosta-Github))提供了一个非常灵巧的短字符串优化。也需要感谢其他献者及社区成员。 + 叶劲峰(Milo Yip,[miloyip](https://github.com/miloyip))是RapidJSON的原作者。全世界许多贡献者一直在改善RapidJSON。Philipp A. Hartmann([pah](https://github.com/pah))实现了许多改进,也设置了自动化测试,而且还参与许多社区讨论。丁欧南(Don Ding,[thebusytypist](https://github.com/thebusytypist))实现了迭代式解析器。Andrii Senkovych([jollyroger](https://github.com/jollyroger))完成了向CMake的迁移。Kosta([Kosta-Github](https://github.com/Kosta-Github))提供了一个非常灵巧的短字符串优化。也需要感谢其他献者及社区成员。 2. 为何你要开发RapidJSON? diff --git a/doc/internals.md b/doc/internals.md index cc9917c..ebfbc8f 100644 --- a/doc/internals.md +++ b/doc/internals.md @@ -116,11 +116,11 @@ Number is a bit more complicated. For normal integer values, it can contains `kI Kosta (@Kosta-Github) provided a very neat short-string optimization. The optimization idea is given as follow. Excluding the `flags_`, a `Value` has 12 or 16 bytes (32-bit or 64-bit) for storing actual data. Instead of storing a pointer to a string, it is possible to store short strings in these space internally. For encoding with 1-byte character type (e.g. `char`), it can store maximum 11 or 15 characters string inside the `Value` type. -| ShortString (Ch=char) | |32-bit|64-bit| +| ShortString (Ch=char) | |32-bit|64-bit| |---------------------|-------------------------------------|:----:|:----:| | `Ch str[MaxChars]` | String buffer |11 |15 | | `Ch invLength` | MaxChars - Length |1 |1 | -| `unsigned flags_` | `kStringType | kStringFlag | ...` |4 |4 | +| `unsigned flags_` | `kStringType kStringFlag ...` |4 |4 | A special technique is applied. Instead of storing the length of string directly, it stores (MaxChars - length). This make it possible to store 11 characters with trailing `\0`.