Sun, 23 Nov 2025 13:15:19 +0100
optimize sorted insertion by using the infimum instead of the supremum
The reason is that the supremum returns the equal element with the smallest index, and we want the largest.
Therefore, we use the infimum, which already gives us the largest index when there are equal elements, and increase the index by one. The infimum is also guaranteed to exist in that case.
|
1211
37cfb534800e
add w.i.p hint to parsers topic
Mike Becker <universe@uap-core.de>
parents:
1141
diff
changeset
|
1 | # Parsers |
|
37cfb534800e
add w.i.p hint to parsers topic
Mike Becker <universe@uap-core.de>
parents:
1141
diff
changeset
|
2 | |
| 1212 | 3 | UCX offers parsers for two common formats: key/value [properties](properties.h.md) and [JSON](json.h.md). |
| 4 | ||
|
1424
563033aa998c
fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents:
1212
diff
changeset
|
5 | Both parser APIs are implemented in a memory-efficient way. |
|
563033aa998c
fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents:
1212
diff
changeset
|
6 | Depending on the use case, the properties parser can avoid memory allocations completely, |
| 1212 | 7 | and the JSON parser minimizes allocations as good as possible. |
|
1424
563033aa998c
fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents:
1212
diff
changeset
|
8 | Due to the nature of JSON, avoiding allocations altogether is, of course, not possible when operating on read-only memory. |