Nick Sabalausky wrote:
As for whether or not this effect can be reasonably accomplished with structs: I have no idea, I haven't really looked into it.

I use a tagged variant for the token struct.

This doesn't make any difference if one is parsing small pieces of code. But when you're trying to stuff millions of lines of code down its maw, avoiding an allocation per token is a big deal.

The indirect calls to the member functions of a class also perform poorly relative to tagged variants.

Reply via email to