admin管理员组文章数量:1335386
Here is a leaderboard prototype for ranking on the left column and could be user indices on the right. The matrix stays sorted. It might get a lot of traffic. Typical size 100,000 and up. (4 2 $0 342 0 54 1 3 1 542) leaderboard1 1 1324
leaderboard1=:{{ (z{.x),y,(z}.x) [ z=. (0{"1 x) i. 0}y }}
I noticed this special combination - x i.!.1 y - is very fast to find/i. - using a sorted array. Is there a way to open a slot (in place) at that row position to insert (0 54768) or similar? The array would have plenty of zero room at the top. I might use a try. catch. to then fill more zeros. The left column ranking might be 0-10 or 0-100. Or is there a way to insert in place using leaderboard1?
My guess is it would be much faster compared to leaderboard1.
Good reference for - "A Method for Fast Leaderboard Calculations in Massive Online Game-Based Environments"
.1155/2018/3234873
本文标签: jNeed a more efficient sorted leaderboard prototypeStack Overflow
版权声明:本文标题:j - Need a more efficient sorted leaderboard prototype - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742389547a2465712.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论