Avatar for the python-humanize user
python-humanize
humanize
BlogDocsChangelog

Refactor: simplify `scientific()` and extract `_SUPERSCRIPT_MAP` constant

#313Merged
Comparing
maayanmatsliah-tech:main
(
13e54db
) with
main
(
55dc47c
)
CodSpeed Performance Gauge
0%
Untouched
15

Benchmarks

15 total
test_scientific
tests/test_benchmarks.py
CodSpeed Performance Gauge
+5%
75.3 µs71.5 µs
test_apnumber
tests/test_benchmarks.py
CodSpeed Performance Gauge
+1%
88.5 µs87.7 µs
test_natural_list
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
34.8 µs34.7 µs
test_metric
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
44.5 µs44.4 µs
test_naturaldate
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
87.2 µs87.1 µs
test_precisedelta
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
203.7 µs203.4 µs
test_fractional
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
65.9 µs65.9 µs
test_intcomma
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
95.1 µs95.1 µs
test_ordinal
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
93.2 µs93.3 µs
test_clamp
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
33.1 µs33.2 µs
test_naturaltime
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
93.7 µs93.9 µs
test_intword
tests/test_benchmarks.py
CodSpeed Performance Gauge
0%
76.1 µs76.4 µs
test_naturaldelta
tests/test_benchmarks.py
CodSpeed Performance Gauge
-1%
62.3 µs62.7 µs
test_naturalday
tests/test_benchmarks.py
CodSpeed Performance Gauge
-1%
63.9 µs64.2 µs
test_naturalsize
tests/test_benchmarks.py
CodSpeed Performance Gauge
-1%
60.2 µs60.8 µs

Commits

Click on a commit to change the comparison range
Base
main
55dc47c
-0.24%
Merge branch 'main' into main
6e297f9
23 days ago
by hugovk
+0.49%
[pre-commit.ci] auto fixes from pre-commit.com hooks
13e54db
23 days ago
by pre-commit-ci[bot]
© 2026 CodSpeed Technology
Home Terms Privacy Docs