If you’re looking at any of the Carbon toolchain, always happy to chat / answer questions / etc on our Discord (or via email). Cheers!
Todd Lehmansays:
This is really cool!
It doesn’t sound like memoization to me, though. I think this is just an ordinary lookup vocabulary an immutable table (albeit an optimized one in the case of a bit-test instruction). Memoization is about caching values as they are discovered and requires the use of a mutable table to cache the newly discovered values over time.
Nathan Myerssays:
Right, this is more akin to what they used to call “dynamic programming”.
Nice, looks like one of the patterns we’ve ended up developing and using all over in the Carbon toolchain!
https://github.com/carbon-language/carbon-lang/blob/trunk/toolchain/lex/tokenized_buffer.cpp#L85-L95
If you’re looking at any of the Carbon toolchain, always happy to chat / answer questions / etc on our Discord (or via email). Cheers!
This is really cool!
It doesn’t sound like memoization to me, though. I think this is just an ordinary lookup vocabulary an immutable table (albeit an optimized one in the case of a bit-test instruction). Memoization is about caching values as they are discovered and requires the use of a mutable table to cache the newly discovered values over time.
Right, this is more akin to what they used to call “dynamic programming”.