Skip to content

BUG: fix FNV-1a 64-bit selection by using NPY_SIZEOF_UINTP (#31035)#31052

Merged
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-31035
Mar 23, 2026
Merged

BUG: fix FNV-1a 64-bit selection by using NPY_SIZEOF_UINTP (#31035)#31052
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-31035

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Mar 23, 2026

Backport of #31035.

close #31034

benchmark result
Change Before [621413b] After [b9ccff1] <fix_size_t> Ratio Benchmark (Parameter)
- 807±30μs 746±10μs 0.92 bench_lib.Unique.time_unique_values(200000, 90.0, 0.2, <class 'numpy.float64'>)
- 1.64±0.02ms 1.52±0.01ms 0.92 bench_lib.UniqueIntegers.time_unique_values(100000, 5000, <class 'numpy.int64'>)
- 1.26±0.01ms 1.16±0.02ms 0.92 bench_lib.UniqueIntegers.time_unique_values(100000, 5000, <class 'numpy.uint32'>)
- 14.8±0.1ms 13.6±0.1ms 0.92 bench_lib.UniqueIntegers.time_unique_values(1000000, 5000, <class 'numpy.int64'>)
- 3.38±0.05μs 3.10±0.03μs 0.92 bench_lib.UniqueIntegers.time_unique_values(200, 25, <class 'numpy.int64'>)
- 1.04±0.01ms 936±9μs 0.9 bench_lib.UniqueIntegers.time_unique_values(100000, 5000, <class 'numpy.int16'>)
- 9.87±0.07ms 8.75±0.07ms 0.89 bench_lib.UniqueIntegers.time_unique_values(1000000, 5000, <class 'numpy.int16'>)
- 11.8±0.1ms 10.5±0.09ms 0.89 bench_lib.UniqueIntegers.time_unique_values(1000000, 5000, <class 'numpy.uint32'>)
- 37.1±0.1ms 29.4±0.1ms 0.79 bench_lib.UniqueIntegers.time_unique_values(1000000, 250000, <class 'numpy.int64'>)
- 29.5±0.2ms 22.6±0.2ms 0.77 bench_lib.UniqueIntegers.time_unique_values(1000000, 250000, <class 'numpy.uint32'>)

@charris charris added this to the 2.4.4 release milestone Mar 23, 2026
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 23, 2026
@charris charris merged commit b2b1bc1 into numpy:maintenance/2.4.x Mar 23, 2026
74 checks passed
@charris charris deleted the backport-31035 branch March 23, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants