3 ms·
Nice writeup, enjoyed reading this. Instead of pointers to string literals, did you consider tokens instead, e.g. a big enum with a matching string table for t
by zwieback 12y ago
Nice writeup, enjoyed reading this.
Instead of pointers to string literals, did you consider tokens instead, e.g. a big enum with a matching string table for the consumer? That's what we did in the past in device drivers although for space reasons instead of speed.
- mortoray 12y agoThat's essentially what pointers to string literals are. They are indexes into a constant data segment which contains the actual strings.
- zwieback 12y agoVery true. The main reason we used them were a) they can be smaller and b) can we flushed to disk for later decoding more easily and c) it's easier to implement a selective logging algorithm if you're only interested in certain events.