|
2 | 2 |
|
3 | 3 | --- |
4 | 4 |
|
| 5 | +## [0.1.3] - 2026-02-26 |
| 6 | + |
| 7 | +### Bug Fixes |
| 8 | + |
| 9 | +#### Fix retry buffer size calculation in AppendFormatInternal |
| 10 | + |
| 11 | +- Changed retry buffer from `written > buf.Length ? written : buf.Length * 2` to `buf.Length * 2` |
| 12 | +- `written` is unreliable on TryFormat failure (may be 0 or partial), so always double the buffer |
| 13 | + |
| 14 | +### Improvements |
| 15 | + |
| 16 | +#### Add diagnostic info to FormatException |
| 17 | + |
| 18 | +- FormatException message now includes `Type`, `alignment`, `format` for easier debugging |
| 19 | + |
5 | 20 | ## [0.1.2] - 2026-02-26 |
6 | 21 |
|
7 | 22 | ### Performance Improvements |
8 | 23 |
|
9 | 24 | #### Replace Composite Format with Direct TryFormatDelegate |
| 25 | + |
10 | 26 | - Removed `AppendFormattedViaComposite`, replaced with `AppendFormatInternal` |
11 | 27 | - Before: built composite format string (`"{0,alignment:format}"`) on the stack per call, then re-parsed via `_sb.AppendFormat` |
12 | 28 | - After: calls `FormatterCache<T>.TryFormatDelegate` directly and handles alignment padding inline |
13 | 29 | - Eliminates composite string construction and re-parsing overhead |
14 | 30 |
|
15 | 31 | #### Avoid Boxing on Null Check (Debug build only) |
| 32 | + |
16 | 33 | - Changed null check from `value == null` to `default(T) == null && value == null` |
17 | 34 | - Prevents unnecessary boxing for value types (null branch entered only for reference types / Nullable) |
18 | 35 |
|
19 | 36 | ### Tests |
20 | 37 |
|
21 | 38 | #### Benchmark Test Improvements |
| 39 | + |
22 | 40 | - `StringBuilder_FourArgs`: changed from reusing StringBuilder to creating a new instance per iteration (fair comparison) |
23 | 41 | - `StringBuilder128_FourArgs`: added benchmark that creates a new StringBuilder with initial capacity 128 per iteration |
24 | 42 | - `StringBuilderShare_FourArgs`: separated the existing shared-StringBuilder approach into its own benchmark |
25 | 43 |
|
26 | | - |
27 | 44 | ## [0.1.1] - 2026-02-24 |
28 | 45 |
|
29 | 46 | ### New Features |
30 | 47 |
|
31 | 48 | #### Format Parameter Support |
| 49 | + |
32 | 50 | Alignment and format specifiers are now properly supported. |
| 51 | + |
33 | 52 | - Fixed: Alignment and format parameters were previously ignored |
34 | 53 | - Example: `XString.Format($"Score: {score,10:F2}")` aligns to 10 characters with 2 decimal places |
35 | 54 |
|
36 | 55 | #### Support for Up to 16 Format Arguments |
| 56 | + |
37 | 57 | Format overloads extended from T1~T4 to T1~T16. |
| 58 | + |
38 | 59 | - Example: `XString.Format("{0} {1} ... {15}", arg1, arg2, ..., arg16)` |
39 | 60 |
|
40 | 61 | ### Tests |
| 62 | + |
41 | 63 | Expanded from 34 to 93 (+174%) |
42 | 64 |
|
43 | 65 | Added tests: |
| 66 | + |
44 | 67 | - 4 concurrency tests (multithreading safety) |
45 | 68 | - 11 edge case tests (boundary conditions, large strings) |
46 | 69 | - 33 functional tests (various scenarios) |
|
0 commit comments