GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — Replace emulated unsigned shorts with chars by richardstartin · Pull Request #364 · RoaringBitmap/RoaringBitmap Conversation
Member
The main aim here is to make signedness bugs impossible, which are frequent in this library, by using Java's unsigned
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Coverage decreased (-0.2%) to 91.505% when pulling 076f594 on richardstartin:chars into 9f2041e on RoaringBitmap:master. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request introduces 2 alerts and fixes 4 when merging 69cf65c into 9f2041e - view on LGTM.com new alerts:
fixed alerts:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The LGTM alerts are in existing code where the emulated unsigned types made the code too difficult to analyse. I'll remove these checks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I see this. Neat. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request introduces 2 alerts and fixes 9 when merging 7291703 into 9f2041e - view on LGTM.com new alerts:
fixed alerts:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Clever. Go!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There's still the 2 new useless checks to find - struggling with the LGTM interface because the offending classes are too large to render effectively, it seems. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request introduces 2 alerts and fixes 10 when merging 00d73cf into 9f2041e - view on LGTM.com new alerts:
fixed alerts:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM is wrong about the introduced cases - I put a breakpoint in private void smartAppendExclusive(char start, char length) { int oldend; if ((nbrruns == 0) || ((start) > (oldend = (getValue(nbrruns - 1)) + (getLength(nbrruns - 1)) + 1))) { // we add a new one valueslength[2 * nbrruns] = start; valueslength[2 * nbrruns + 1] = length; nbrruns++; return; } if (oldend == (start)) { // we merge valueslength[2 * (nbrruns - 1) + 1] += length + 1; return; } int newend = (start) + (length) + 1; if ((start) == (getValue(nbrruns - 1))) { // we wipe out previous if (newend < oldend) { setValue(nbrruns - 1, (char) newend); setLength(nbrruns - 1, (char) (oldend - newend - 1)); return; } else if (newend > oldend) { setValue(nbrruns - 1, (char) oldend); setLength(nbrruns - 1, (char) (newend - oldend - 1)); return; } else { // they cancel out nbrruns--; return; } } setLength(nbrruns - 1, (char) (start - (getValue(nbrruns - 1)) - 1)); if (newend < oldend) { setValue(nbrruns, (char) newend); setLength(nbrruns, (char) (oldend - newend - 1)); nbrruns++; } else if (newend > oldend) { setValue(nbrruns, (char) oldend); setLength(nbrruns, (char) (newend - oldend - 1)); nbrruns++; } } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request introduces 2 alerts and fixes 10 when merging 374be1e into 9f2041e - view on LGTM.com new alerts:
fixed alerts:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok. Then let us merge. I expect that we can’t go wrong (performance-wise). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Regarding performance, I ran some of the real data benchmarks (ForEach and Or) and found there were a few big improvements, but also some small regressions. I don't know why. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request introduces 2 alerts and fixes 16 when merging 076f594 into 3f0424d - view on LGTM.com new alerts:
fixed alerts:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@richardstartin I take it that you recommend merging? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes I think so, we can revert if performance regressions materialise. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Released. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* replace short[] with char[] to eliminate signedness bugs * eliminate toIntUnsigned * eliminate compareUnsigned and simplify conditions * rename short iterators * optimise imports, remove some unnecesary lowbits masks * remove some useless comparisons * remove some warnings from run containers * basic cleanup for LGTM analysis
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.