i'm new r. want use hash function hold key-value pairs doubles/numerics.
i have function f(x) = y function f takes input x double , returns y double. use function f(x) on 10^8 times in code (and use more often), , 99% of time f(x) has been computed once already. store answers key-value pairs, can find them instead of calculating them again.
i read article below using environments hash tables, cannot figure out how use doubles key-value pairs.
https://www.r-bloggers.com/hash-table-performance-in-r-part-i/
how use doubles key-value pairs in hash function in r?
Comments
Post a Comment