Hacker News new | past | comments | ask | show | jobs | submit login

> Why is this so much slower?

Just a side note: Go test supports benchmarking (https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-i...) which gives you few useful tools such as `b.ReportAllocs()` and `go test -bench . -cpuprofile cpu.out -memprofile men.out`. These tools can give you far better information than just the execution time of a test case.




Also this article is a must-read to understand about the shortcomings of Go 1.18 implementation of generics:

https://planetscale.com/blog/generics-can-make-your-go-code-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: