Re:The Use of assert() in SQLite
by fredsanford on Saturday April 27, 2019 @09:49AM
(#19765492)
Exceptions have a setup cost. You pay that setup cost every time an exception frame is created.
[ Parent
| on HN ]
Re:The Use of assert() in SQLite
by plorkyeran on Saturday April 27, 2019 @12:53PM
(#19766432)
That is not true on most platforms in use today. The Itanium ABI uses "zero cost" exceptions which do not have any setup or runtime cost when an exception is not thrown (at the cost of making throwing exceptions much more expensive than other schemes). 64-bit Windows and arm64 use similar schemes.
Re:The Use of assert() in SQLite
by fredsanford on Sunday April 28, 2019 @02:42AM
(#19769731)
I guess I have to use weasel words in every post now.
Let's pretend my previous post started with
"In most cases, "
Re:The Use of assert() in SQLite
by Dylan16807 on Sunday April 28, 2019 @06:10AM
(#19770298)
But that's the point, it's not most. GCC and Clang default to zero-cost DWARF. Add Windows and Arm64 and that's almost everything.