[MDEV-23002] Replace bool's with bitmaps in Item and THD Created: 2020-06-24 Updated: 2021-06-23 Resolved: 2021-06-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | 10.6.1 |
| Type: | Task | Priority: | Minor |
| Reporter: | Michael Widenius | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Replace bool in Item and THD with bitmap. In THD and Item (the base class) we have a lot of bool variables. in my_tree.h we have an example bitmap of how to do it:
I think it's ok to use ulonglong variables for the bitmaps. It's ok to to also group variables in THD and Item so that all variables of the same size are together (this will save space as there is less holes between variables). However variables that As part of the task is to do:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2020-06-29 ] | ||||||||||||||||||||
|
I added my approach for LEX & Co for 10.6 (bit.diff) fize is following:
| ||||||||||||||||||||
| Comment by Dan Solodko [ 2020-08-17 ] | ||||||||||||||||||||
|
Binary size (byte) 307 718 856 -> 301 845 608 | ||||||||||||||||||||
| Comment by Michael Widenius [ 2021-06-23 ] | ||||||||||||||||||||
|
I tried first to use bitmaps, but the compiler (gcc 7.x) did output so bad code when assigning multiple bits in a row, so it was not usable. The whole history of trying bit and then moving to explicit bit handling is recorded in the 10.6 tree. | ||||||||||||||||||||
| Comment by Michael Widenius [ 2021-06-23 ] | ||||||||||||||||||||
|
Pushed to 10.6.1 |