1 | | = Performance comparison = |
| 1 | = Performance = |
| 2 | |
| 3 | Implementation of Universal_String use several techniques to speedup performance and minimize memory footprint: |
| 4 | |
| 5 | - string data stored in UTF-16 encoded form internally, so it occupies two times less memory then Wide_Wide_String for most modern languages. |
| 6 | |
| 7 | - use of implicit sharing (also known as copy-on-write) technology allows Universal_String to have constant time of assignment operation. |
| 8 | |
| 9 | - use of atomic operations to handle reference counter makes Universal_String as safe in multitasking context as other Ada types. |
| 10 | |
| 11 | - use of special algorithms and utilization of SIMD operations (when available) significantly improve performance. |
| 12 | |
| 13 | == Performance comparison == |