3 ms·
How did you generate the timings on: https://benhoyt.com/images/go-1brc-profile-r9-source.png https://benhoyt.com/images/go-1brc-profile-r9-source.png ?
by Beltalowda 3y ago
How did you generate the timings on: https://benhoyt.com/images/go-1brc-profile-r9-source.png https://benhoyt.com/images/go-1brc-profile-r9-source.png ?
- benhoyt 3y agoUsing Go's profiling tool with its "source" view: I used "go tool pprof -http=: cpu.prof", where cpu.prof was generated by "go-1brc -cpuprofile=cpu.prof -revision=9 measurements.txt".
- Beltalowda 3y agoCheers; I've always difficulty mapping those pprof graphs to actual concrete code and I never managed to get anything more useful out of it. This is the biggest take-away from this post to be honest; had no idea it could do anything like that. Sometimes it's the little things... You can get something similar with the CLI using: go tool pprof -weblist='mypkgname' cpu.out # Generate HTML and open go tool pprof -list='mypkgname' cpu.out # Generate text to stdout