Fix issue https://github.com/yuin/gopher-lua/issues/214#515
Fix issue https://github.com/yuin/gopher-lua/issues/214#515VigorFox wants to merge 1 commit intoyuin:masterfrom
Conversation
|
Is there any bench mark data available for showing performance of new implementation vs old? |
The swiss map bench is in the link blow, in Figure 5. My teammate also did a bench between c base lua 5.1, original gopher-lua and this fix. Here's the result: lua 5.1: 1 million: 10 million: 20 million: 40 million: 60 million: original gopher-lua: 1 million: 10 million: 20 million: 40 million:
gopher-lua with swiss map: 1 million: 10 million: 20 million: 40 million: 60 million: |
|
Thank you for taking the time to provide those figures. Overall the figures look really good to me. Although I guess they don’t bench the iteration performance; which may be worth a test as the Swiss map impl has to do more work than the original gopher lua one in this area, given gopher lua was able to use the k2i map. However, the k2i map was also the root of the memory leak, so it could be argued it’s not a fair comparison anyway. Overall, this looks really interesting, I’ll certainly consider using this in future, regardless of whether it’s merged to mainline here. Thanks for sharing. |
replace golang native map with swiss map for table hash parts
Fixes #214