mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 11:13:50 +00:00
Replace strtod() with Clinger's fast path in tinygltf_json.h for ~1.5x faster JSON float parsing. The new parser accumulates all digits into a uint64 mantissa and uses exact power-of-10 tables for conversion, avoiding locale-dependent strtod for ~99% of JSON float values. Add optional float32 parse mode (parse_float32 option) that parses JSON floats at single precision — fewer significant digits needed, wider fast path range. Breaks strict double-precision conformance but sufficient for glTF data which is typically single-precision. Benchmark additions: - gen_synthetic: add float_heavy preset (~500MB ASCII float JSON) - bench_v3: add --float32 flag for float32 parse mode benchmarking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
161 KiB
161 KiB