jub0bs personal blog

The cost of Go's panic and recover

TL;DR ¶ Some of the wisdom contained in Josh Bloch’s Effective Java book is relevant to Go. panic and recover are best reserved for exceptional circumstances. Reliance on panic and recover can noticeably slow down execution, incurs heap allocations, and precludes inlining. Internal handling of failure cases via panic…
Points
150
HN comments
176
Submissions
1
Cited by
0 commenters

Software EngineeringProgramming Languages2025

On Hacker News

SubmittedTitle on HNPointsComments
Mar 1, 2025The cost of Go's panic and recover by todsacerdoti150176

Related posts from the same era