Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Optimizing a Go Package by 38147125738.8x
(
xnacly.me
)
2 points
by
xnacly
7 months ago
|
hide
|
past
|
favorite
|
2 comments
FrankWilhoit
7 months ago
[–]
? Sanity check, please. There is no processor in existence on which any operation can be performed in one-thirtieth of a nanosecond. Has their compiler optimized their entire algorithm away?
xnacly
7 months ago
|
parent
[–]
It specifically says ns/op, go test executes the operation many times and calculates the average execution time for one operation:
https://pkg.go.dev/testing#hdr-Benchmarks
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: