You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced/performance-optimization.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Measures the cost of applying one `DataFix` to a `Dynamic` value.
50
50
**Key takeaways:**
51
51
52
52
-**Framework overhead is ~0.25 µs** per fix invocation (identity fix baseline).
53
-
- A simple rename adds only ~0.03–0.06 µs on top of the framework overhead.
53
+
- A simple rename adds only ~0.03-0.06 µs on top of the framework overhead.
54
54
- Payload size has minimal impact on simple field operations - the cost scales with fix complexity, not data size.
55
55
- A realistic domain fix (player data with multiple field transformations) takes ~9 µs.
56
56
- End-to-end migration (including schema lookup and type routing) adds ~22 µs overhead on top of the raw fix.
@@ -155,7 +155,7 @@ Measures raw field read, set, and object generation performance per `DynamicOps`
155
155
156
156
**Key takeaways:**
157
157
158
-
-**SnakeYamlOps is the fastest for field reads** - 2–3x faster than Jackson-based implementations. This is because SnakeYaml uses native Java `Map`/`List` types with direct `HashMap.get()` lookups, while Jackson and Gson use tree node wrappers (`ObjectNode`, `JsonObject`).
158
+
-**SnakeYamlOps is the fastest for field reads** - 2-3x faster than Jackson-based implementations. This is because SnakeYaml uses native Java `Map`/`List` types with direct `HashMap.get()` lookups, while Jackson and Gson use tree node wrappers (`ObjectNode`, `JsonObject`).
159
159
-**SnakeYamlOps is also the fastest for field sets** - 6x faster than Jackson at SMALL payloads, because Java `HashMap.put()` is an in-place mutation, while Jackson's `ObjectNode.set()` involves tree copying.
160
160
-**All Jackson-based formats perform identically** for in-memory operations. JacksonJsonOps, JacksonYamlOps, JacksonTomlOps, and JacksonXmlOps share the same `ObjectNode`/`ArrayNode` tree model - format differences only matter during serialization/deserialization.
161
161
-**GsonOps is consistently the slowest** for field operations due to `JsonObject.deepCopy()` on mutations.
@@ -173,7 +173,7 @@ Measures end-to-end `DataFixer.update()` throughput per format (single rename fi
173
173
| GsonOps | 3.628 | 3.314 | 3.231 |
174
174
| JacksonXmlOps | 3.620 | 3.644 | - |
175
175
176
-
**Key takeaway:** Migration throughput is nearly identical across all formats (~3.6–3.7 ops/µs). The DataFixer framework overhead dominates over format-specific differences. Choose your format based on your application's needs, not migration speed.
176
+
**Key takeaway:** Migration throughput is nearly identical across all formats (~3.6-3.7 ops/µs). The DataFixer framework overhead dominates over format-specific differences. Choose your format based on your application's needs, not migration speed.
177
177
178
178
### Cross-Format Conversion
179
179
@@ -224,7 +224,7 @@ Measures encode and decode throughput for individual primitive values.
224
224
225
225
- String, Integer, and Boolean codecs operate at ~4 ns per operation - effectively free in the context of a migration.
226
226
- Float, Long, and Double are ~40% slower due to boxing and number conversion overhead but still under 7 ns per operation.
227
-
- Encoding is consistently ~5–10% faster than decoding.
227
+
- Encoding is consistently ~5-10% faster than decoding.
228
228
229
229
### Collection Scaling
230
230
@@ -272,7 +272,7 @@ Measures migration throughput under concurrent load.
272
272
273
273
| Operation | 2 Threads (ops/µs) |
274
274
|-----------------|---------------------:|
275
-
| Latest lookup | 481.9 – 490.7 |
275
+
| Latest lookup | 481.9 - 490.7 |
276
276
| Registry lookup | 111.1 |
277
277
278
278
**Key takeaways:**
@@ -290,9 +290,9 @@ Measures migration throughput under concurrent load.
0 commit comments