savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
156 stars 12 forks source link

Add `InhibitOptimization`, with two functions useful in benchmarking. #310

Closed jemc closed 2 years ago

jemc commented 2 years ago

These two functions use a special compiler intrinsic implementation to observe effects from earlier operations, to ensure those earlier optimizations are not totally optimized away (while still allowing them to be heavily optimized by the compiler within their implementation).