-
Enhancement
-
Resolution: Fixed
-
P3
-
6
-
b20
-
generic, x86
-
generic, linux, windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2152591 | OpenJDK6 | Martin Buchholz | P3 | Resolved | Fixed | b01 |
Josh Bloch writes,
"In 1.4, we added methods nextSetBit(int) and nextClearBit(int). This was good as far as it went. We should also have added previousSetBit(int) and previousClearBit(int).
The reason this is a reasonable RFE is that it's MUCH slower to code these methods up from the outside as you don't have access to the words that make up bit set, so you have to operate a bit at a time, range-checking the bit index each time. The resulting method is probably 100 times as slow as it should be. (I haven't timed it, so don't believe this estimate.)"
"In 1.4, we added methods nextSetBit(int) and nextClearBit(int). This was good as far as it went. We should also have added previousSetBit(int) and previousClearBit(int).
The reason this is a reasonable RFE is that it's MUCH slower to code these methods up from the outside as you don't have access to the words that make up bit set, so you have to operate a bit at a time, range-checking the bit index each time. The resulting method is probably 100 times as slow as it should be. (I haven't timed it, so don't believe this estimate.)"
- backported by
-
JDK-2152591 Add BitSet.previousClearBit, previousSetBit
-
- Resolved
-
- duplicates
-
JDK-6505531 Add BitSet.prevSetBit, BitSet.prevClearBit
-
- Closed
-