Commit 98d36b4
authored
Fix ordered set prepend bug (#115)
The scoring for prepended elements was not being calculated correctly.
It needs to decrement the score by 0.000001 for each element. Previously
it was increasing the score, but because the base score was decreasing
the bug was not exposed.
Using Ruby 3.2.2, performance seems to be much improved, exposing this
bug.1 parent be13d7a commit 98d36b4
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
0 commit comments