3 ms·
I think you're missing my point, which is that the language is providing qsort as part of it's standard library, so the indirect function call within qsort coun
by naasking 4y ago
I think you're missing my point, which is that the language is providing qsort as part of it's standard library, so the indirect function call within qsort counts as the "language's inner loops", no?
- 082349872349872 4y agoWe're talking past each other; I'm making a distinction between a language and its libraries which you are not making. Consider a simpler example: let's profile not just qsort, but a couple of other relatively long-running library calls, and let's strip the executable beforehand, so we aren't even working with symbolic information, just a bunch of code addresses. If we get multiple different hotspots, we're likely looking at a compiled library. If we get the same hotspot in each case, we're likely looking at an interpreted library (and seeing the interpreter's dispatch loop).
- naasking 4y agoThe fact that you have to use "likely" means it's just a guess and no longer a sharp "line in the sand" as I originally described. Languages that operate on large data structures (like Julia and R) may have a similar design to using higher-order/callback functions like qsort everywhere, but those hotspots will always be in the language/standard library even when programs are compiled. I just don't think it's a reliable enough metric for this distinction.
- 082349872349872 4y agoMakes sense. Come to think of it, I would also caveat threaded (as in forth subroutine-threading not as in thread-local) code as showing up fuzzily for my approach.