[Web Feed] Back in 2018, we compared empirically the performance overheads of Go and C++...

Feed Supplier <[email protected]> Mon, 10 May 21 01:28:30 UTC
Newsgroups alt.comp.programming
Organization Usenet.Farm
Message-ID <[email protected]>
.. with regards to the low-level calling convention: to pass argu



Back in 2018, we compared empirically the performance overheads of Go and C++ with regards to the low-level calling convention: to 
dr-knz.net/measuring-argument-passing-in-go-and-cpp.html: pass arguments, to 
dr-knz.net/measuring-multiple-return-values-in-go-and-cpp.html: return multiple values, and 
dr-knz.net/measuring-errors-vs-exceptions-in-go-and-cpp.html: when propagating exceptions.

Those results were obtained with Go 1.10 and Clang 6.0. Since then, compilers have evolved and we are now running with Go 1.15 and Clang 11.0. Have the findings changed since then?

The question of interest was:


What is cheaper: handling exceptions via 


panic


 / 


recover


, or passing and testing error results with 


if err := ...; err != nil { return err }


?


In fact, as we will see below, the conclusions are stronger today than they were two years ago.




Link 1


Errors vs. exceptions in Go and C++ in 2020  - Why and how exceptions are still better for performance, even in Go  · dr knz @ work
: https://dr-knz.net/go-errors-vs-exceptions-2020.html