| ▲ | zelphirkalt a day ago | |||||||
The diagrams could use a bit bigger font. It is slightly hard to read. Or make the pictures bigger on the website, but they are already big. As far as I can see, there is no mention of how many elements are inserted in each run? The x/horizontal-axis is not number of items, as one would expect, but is "run #" which I interpret to be "number of the run"/"run number", which says nothing about the number of elements added to the data structures. So from what is visible in the writing of post, one couldn't actually conclude the conclusion. I guess the idea is, that you must go and look at the code itself. This post could do a better job at explaining what is measured, especially since it is about a benchmark. But aside from that: I think the answer here is not merely from a performance side of things. If there is a chance, that your program might grow to need to put more stuff in that a-list, I think you can just go for a hashtable right away and save yourself the effort to later change the code. Unless you are hyper-optimizing stuff, which most of the time we are not. I also want to note, that there is SRFI-69 [1], which has `a-list->hash-table`, in case you want to opt for a-list because of how easy they are to write in the code. Choosing an a-list in a scenario where it might still be faster is not only a trade-off in performance, but also in maintainability. Are you ready to build an abstraction layer around a-list, so that you can later switch it out and put a hash-table in easily? If not, then the little performance cost for using a hash-table too early might be the better trade-off, compared to having to replace usages of a-list in the code later. I think a-list is fine for things where you:
Otherwise just use a hash-table and maybe, maaaaybe check again, if there is really any performance bottleneck that can be traced back to using a hash-table. Don't obsess over it. | ||||||||
| ▲ | SkiFire13 a day ago | parent [-] | |||||||
> As far as I can see, there is no mention of how many elements are inserted in each run? FYI it's in the title of the plots. | ||||||||
| ||||||||