Atomic nibble instead of mutex#1601
Conversation
| Byte ** get_raw_tables() | ||
| { | ||
| return _counts; | ||
| return (Byte **)_counts; |
There was a problem hiding this comment.
Not sure what to do about this. What is the use case for get_raw_tables() beyond nosy devs wanting to peak inside?
|
the explicit rationale is somewhere in the merged pull request history...
seek answers there :)
|
|
Seems like this was the first time this came up: #667 From what I gather of the discussion there I don't think we can use the buffer interface to fake the "round up to nearest byte". Should we move it up the inheritance tree to expose it only for |
5229519 to
f422e07
Compare
I think this is reasonable. |
a870206 to
641436f
Compare
|
Ready for review! @luizirber, @camillescott, @standage , or @ctb |
988cf32 to
921bf9b
Compare
Codecov Report
@@ Coverage Diff @@
## master #1601 +/- ##
=========================================
- Coverage 70.11% 70.1% -0.01%
=========================================
Files 66 66
Lines 8906 8877 -29
Branches 3009 2999 -10
=========================================
- Hits 6244 6223 -21
- Misses 1040 1041 +1
+ Partials 1622 1613 -9
Continue to review full report at Codecov.
|
Use individual bytes that can be updated atomically instead of mutexes.
Node* or SmallCount* objects pack things into individual bytes which makes the raw table points unsuitable for numpy.frombuffer
ea7bb2d to
f47c07c
Compare
NibbleStorageuses a big (bad) mutex. This is pretty slow. This PR removes that and instead uses an array of atomic bytes.make testDid it pass the tests?make clean diff-coverIf it introduces new functionality inscripts/is it tested?make format diff_pylint_report cppcheck doc pydocstyleIs it wellformatted?
additions are allowed without a major version increment. Changing file
formats also requires a major version number increment.
documented in
CHANGELOG.md? See keepachangelogfor more details.
changes were made?
tested for streaming IO?)