CLOVIS
08/17/2023, 3:00 PM__FILE__
and __LINE__
in C. The goal is to have a function that measures the performance of some code, and is able to report it with a link to its call, for ease of debugging.
I know it's possible to get that information by throwing an exception, catching it and exploring the stacktrace, but that would have a performance impact, whereas this should be able to be embedded at compile-time to avoid any performance difference.ephemient
08/17/2023, 3:07 PM.main.kts
already supports __FILE__
, although it's handled as a val
that the script runner supplies at runtimeephemient
08/17/2023, 3:09 PMOleg Yukhnevich
08/17/2023, 3:33 PMCLOVIS
08/18/2023, 12:03 PM