you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 days ago

Yeah, in most languages panic-type operations are relatively expensive compared to return-compare operations, and most languages recommend not using throw as a common-case branching pattern when testing return values is available. You usually don't want throw/catch to be called in a tight loop.

  • source
  • parent