-
Notifications
You must be signed in to change notification settings - Fork 0
sdsl comparison #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
sdsl comparison #25
Conversation
Malkovsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor representation issues
| For comparison with range min-max tree implementation from [sdsl-lite](https://github.com/simongog/sdsl-lite) (Release build required: `cmake .. -DCMAKE_BUILD_TYPE=Release`): | ||
|
|
||
| ```bash | ||
| sudo cpupower frequency-set --governor performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very limited instruction for performance stabilization, cpupower is not shipped by default in ubuntu as af as I know. I you really want the make a hint for a reader about performance variance, refer to the original page at google benchmarks.
| ``` | ||
|
|
||
| For visualization, write the JSON output to a file using `--benchmark_out=<file>` (e.g. `./bench_rmm --benchmark_out=rmm_bench.json`) and plot it with `misc/plot_rmm.py`. | ||
| For comparison with range min-max tree implementation from [sdsl-lite](https://github.com/simongog/sdsl-lite) (Release build required: `cmake .. -DCMAKE_BUILD_TYPE=Release`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although rookies still make mistakes about measuring performance in debug build, the remark in the brackets is common knowledge. If you want to make a hint for novices, it is better to leave a message "make sure to build with -DCMAKE_BUILD_TYPE=Release to achieve intended performance`" to actually pinpoint what is it intended for.
| /usr/local | ||
| ) | ||
|
|
||
| if(NOT SDSL_INCLUDE_DIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that SDSL is intended for comparison only and thus it is better to configure it to be easily excluded, i.e. for example introducing some variable like THIRD_PARTY_BENCHMARK and set to false by default, activating only when it is intended.
|
|
||
| ## 1. Введение | ||
|
|
||
| В рамках семестрового проекта была реализована структура данных **Range Min–Max Tree (RmMTree)** над битовым вектором для операций над **правильными скобочными последовательностями (balanced parentheses, BP)**. Реализация основана на идеях из статьи (ScienceDirect): https://www.sciencedirect.com/science/article/pii/S0304397516300706 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Общепринятые стили цитирование либо сразу писать как-то так
Cordova J., Navarro G. Simple and efficient fully-functional succinct trees //Theoretical Computer Science. – 2016. – Т. 656. – С. 135-145.
Или использовать менеджер ссылок типа bibtex, quarto умеет импортировать его, но я не проверял работает ли в режиме презентации. Стиль ссылок тоже можно настроить, в презентации это обычно краткая ссылка типа авторы+год+гиперссылка.
Ссылаться на ScienceDirect -- это примерно тоже самое, что ссылаться на MIT Press при цитировании "Алгоритмы Построение и Анализ" КЛРШ
|
|
||
| Цель проекта — получить | ||
| - **сжатую** ($o(n)$ доп. памяти) | ||
| - и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно оставить так, но отмечу, что я никогда не ставил задачи сделать "асимптотически быстрое" решение, я ставил задачу сделать "просто быстрое" решение на размерах в диапазоне хотя бы до 2^32
| - **сжатую** ($o(n)$ доп. памяти) | ||
| - и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы) | ||
| - структуру, поддерживающую типовой набор запросов: | ||
| - `rank` / `select` по битам, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что такое rank/select? Я то знаю, откуда это знает зритель?
| - и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы) | ||
| - структуру, поддерживающую типовой набор запросов: | ||
| - `rank` / `select` по битам, | ||
| - операции с **excess** (префиксная сумма с шагами +1/−1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Плохо написано, лучше excess(i)=rank_1(i)-rank_0(i)
| - `select`: `O(n)`, | ||
| - `range_min/max` и `mincount/minselect`: `O(j-i)` и т.п. | ||
|
|
||
| Плюсы: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как-будто плюсы и минусы не информативны
| - структуру, поддерживающую типовой набор запросов: | ||
| - `rank` / `select` по битам, | ||
| - операции с **excess** (префиксная сумма с шагами +1/−1), | ||
| - `fwdsearch` / `bwdsearch`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Опять же, что за операции непонятно. Если ты собираешься всё это словами проговаривать, то скорее всего дальше уже просто никто слушать не будет.
Наиболее разумный вариант -- написать, что основное назначение реализация навигации по правильной скобочной последовательности, т.е. расписать что такое enclose желательно с картинкой, а вспомогательные операции просто перечислить
| ## 2. Постановка задачи и требования | ||
|
|
||
| ### 2.1. Входные данные | ||
| - Битовая строка `'0'/'1'` или массив 64-битных слов `uint64_t` с укладкой **LSB-first** (младшие биты — более ранние позиции). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Способ представления битовой строки не относится к твоей работе, детали о uint64_t и lsb-first излишние.
| - `select` в блоке делается через перебор установленных битов (внутри 64 бит), | ||
| - удобно читать байты/16-битные фрагменты для LUT и SIMD. | ||
|
|
||
| #### 3.2.2. Идея блокирования и дерева |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
разделения на блоки?
| ### 4.2. SIMD (AVX2) для поиска по префиксу в листе | ||
|
|
||
| В реализации предусмотрена опциональная поддержка AVX2 (`PIXIE_AVX2_SUPPORT`): | ||
| - берутся 16 бит (`get_u16`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лично я ничего не понял из последующего описания
| - для `minselect` — заранее генерируется `q` в допустимом диапазоне (через `mincount`). | ||
|
|
||
| ### 7.2. Поддерживаемые параметры бенчмарков (как аргументы командной строки) | ||
| - `--min_exp`, `--max_exp` — диапазон размеров `N = 2^e`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем вся эта информация? Лучше добавь конкретные картинки
Uh oh!
There was an error while loading. Please reload this page.