Commit dd28719a authored by Milo Yip's avatar Milo Yip

Minor doc fixes

parent d882fa6d
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
1. Who are the developers of RapidJSON? 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? 2. Why do you develop RapidJSON?
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
1. 谁是RapidJSON的开发者? 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? 2. 为何你要开发RapidJSON?
......
...@@ -116,11 +116,11 @@ Number is a bit more complicated. For normal integer values, it can contains `kI ...@@ -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. 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 str[MaxChars]` | String buffer |11 |15 |
| `Ch invLength` | MaxChars - Length |1 |1 | | `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`. 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`.
......
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