Worth a looka fix or feature you may wantThe raw payload has no superseded_by markers and contains no deprecation notice. The GetExtended rewrite affects the Pascal implementation used outside WIN32DELPHI; Delphi Win32 retains its separate x87 assembly implementation. Performance claims come from code structure and the commit intent, not from benchmark data in the payload.
Pascal numeric parsers are rewritten around faster integer paths
The Pascal implementations behind GetExtended and GetNumericVariantFromJson now keep common integer and short-decimal inputs on tighter loops, while preserving guarded handling for long mantissas, exponents and Int64 limits. The GetExtended tests also make zero-sign normalization and several 18–20 digit fractions explicit. There is no signature migration, but applications that depend on exact numeric variant types or floating-point edge cases should validate against build 2.4.16865.
TL;DR
- Land on build 2.4.16865 and regression-test numeric conversion code that depends on exact variant types or boundary rounding.
- The non-Win32 Pascal GetExtended path was streamlined twice, with separate fast loops for the first 18 digits, overflow-aware continuation, fractions and exponents.
- GetExtended now intentionally normalizes -0 and -0e400 to numeric zero on its Pascal path, following the behavior recorded by the new tests.
- GetNumericVariantFromJson unrolls its first digits and rewrites Int64, Currency and Double selection without changing its public signature.
- mormot.core.base adds the public MIN_INT64 constant and the TSynVarData.VPtrInt overlay member.
Upgrade advice
Take build 2.4.16865 as the complete parser sequence. No broken intermediate range is identified in the raw payload, but the four commits are tightly coupled: the final JSON parser uses MIN_INT64 introduced immediately before it. Re-run tests for -0, Int64 extrema, long decimal mantissas, Currency values with up to four fractional digits, scientific notation and invalid JSON numbers on every Delphi and FPC backend you ship.
4 of 4 entries · 4 commits upstream
1
Medium
JSON numeric variants get an unrolled common-digit parser
GetNumericVariantFromJson now unrolls its initial digit accumulation, processes later digits in paired and overflow-aware loops, handles MIN_INT64 with an explicit sentinel, and separates fraction and exponent validation. The result phase was rewritten around positive magnitude values for varInteger, varInt64, varCurrency and varDouble, including pointer-sized zero initialization through TSynVarData.VPtrInt.
Performance
mormot.core.variants
c88c4ad7+170-93
core: rewritten GetNumericVariantFromJson()
Impact
All Delphi and FPC callers of the public function use the new Pascal implementation. The signature and accepted JSON grammar are unchanged in the diff, but the code deciding exact integer, Currency or Double storage has been substantially replaced; consumers that inspect TVarData.VType should regression-test representative boundaries. No benchmark result is included in the payload.
Worth a look
Test the returned VType and value around 32-bit, Int64 and Currency limits, plus long mantissas and signed exponent forms.
Units
2
Medium
GetExtended removes work from common integer and decimal paths
The non-WIN32DELPHI GetExtended parser replaces several signed counters and temporary floating-point values with PtrUInt digit handling, returns integers and zero directly, and folds power-of-ten scaling into fewer operations. Its NAN/INF probe now reads a two-byte prefix before checking the third character. The same commit documents why the JSON numeric parser divides by exact powers for short negative exponents.
Performance
mormot.core.text+1
700177da+64-74
core: slightly optimized GetExtended() code
Impact
FPC and non-Win32 Delphi builds use the streamlined Pascal path; Delphi Win32 continues to use its x87 assembly implementation. The public signatures remain unchanged. The direct zero path normalizes negative zero, a behavior made explicit by the next commit’s tests.
Worth a look
Include signed zero and representative exponent boundaries in parser regression tests before upgrading.
Public API
GetExtendedbehaviour-changed — The Pascal path normalizes -0 and zero with an exponent to numeric zero; signatures are unchanged.
3
Medium
GetExtended splits fast digits from overflow-aware parsing
The Pascal GetExtended implementation is rewritten again: the first 18 integer digits are accumulated without overflow checks, later digits use a guarded loop, excess significant digits are skipped while their decimal position is retained, and fractional and exponent syntax have dedicated validation. Tests add long fractional boundary cases, invalid -e1 and .e2 inputs, and the expected normalization of -0e400.
Performance
mormot.core.text
71129606+66-33
core: rewritten GetExtended() pascal
Impact
This is the final GetExtended implementation in the edition and it broadens regression coverage around 18–20 significant digits. It affects FPC and non-Win32 Delphi parsing performance and edge results; Delphi Win32 keeps its assembly path. No caller source change is required.
Worth a look
Re-run exact-bit conversion tests for long mantissas, subnormals and exponent limits on non-Win32 targets.
Units
4
Low
MIN_INT64 and a pointer-sized variant overlay become public
mormot.core.base adds MIN_INT64 beside MAX_INT64 and adds VPtrInt under the varOleInt arm of TSynVarData. TRestStorageInMemory.FindMax uses the named constant instead of low(Int64), and a GetExtended comment clarifies why its Pascal loop is not unrolled like the JSON parser.
New features
mormot.core.base+2
e5746e2f+7-4
core: minor refactoring including new MIN_INT64 constant
Impact
Existing ORM behavior is unchanged. Library and application code can now use a named signed 64-bit minimum and can clear or access the pointer-sized integer storage of TSynVarData directly. The additions compile according to PtrInt width on Delphi and FPC.
Public API
MIN_INT64added — Public constant equal to low(Int64).TSynVarData.VPtrIntadded — Pointer-sized integer view added to the varOleInt overlay arm.