Hacker News new | ask | show | jobs
by ekr 3109 days ago
I haven't read that paper (Learned Index Structures), but things like gperf have existed for decades. Are these enhanced data structures dynamic, i.e. unlike gperf which is a static one, does it reoptimize as you insert new elements?

In the case of the hash table, I assume it's using the model to compute the hash function.

2 comments

No, it doesn't handle inserts. On the other hand, the paper writes:

"An ... approach to handling inserts is to build a delta-index. All inserts are kept in buffer and from time to time merged with a potential retraining of the model."

Under some assumptions it does handle inserts. From [1]: Finally, assume that the inserts follow roughly a similar pattern as the learned CDF; [...] Under these assumptions the model might not need to be retrained at all.

[1] https://www.arxiv-vanity.com/papers/1712.01208v1/

This is not like gperf.
I think it is a bit like gperf. What do you consider the big difference?