3 ms·
for example, when logging, you can have a source line prepended to the beginning of the line, which certainly uses the pclntab It needs to go through the table
by userbinator 8y ago
for example, when logging, you can have a source line prepended to the beginning of the line, which certainly uses the pclntab
It needs to go through the table to find which source line corresponds to the current instruction pointer? That's the only reason I can see for needing it, and a very roundabout way of getting information which is known at compile-time and could be simply a constant whereever it's used, much like C has __FILE__ and __LINE__.
- rwj 8y agoThat's not enough for the stack traces. A crash in Go is way more informative than failing an assert in C. Whether the extra memory is worth it is a separate questions.