Skip to content

sdsl comparison - #25

Merged
Malkovsky merged 6 commits into
mainfrom
rmM-tree
Feb 6, 2026
Merged

sdsl comparison#25
Malkovsky merged 6 commits into
mainfrom
rmM-tree

Conversation

@RSMT98

@RSMT98 RSMT98 commented Dec 20, 2025

Copy link
Copy Markdown
Collaborator
image image image image image image image image image

@Malkovsky Malkovsky left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor representation issues

Comment thread README.md
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

Copy link
Copy Markdown
Owner

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.

Comment thread README.md
```

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`):

Copy link
Copy Markdown
Owner

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.

Comment thread CMakeLists.txt
/usr/local
)

if(NOT SDSL_INCLUDE_DIR)

Copy link
Copy Markdown
Owner

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.

Comment thread REPORT.md

## 1. Введение

В рамках семестрового проекта была реализована структура данных **Range Min–Max Tree (RmMTree)** над битовым вектором для операций над **правильными скобочными последовательностями (balanced parentheses, BP)**. Реализация основана на идеях из статьи (ScienceDirect): https://www.sciencedirect.com/science/article/pii/S0304397516300706

Copy link
Copy Markdown
Owner

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 при цитировании "Алгоритмы Построение и Анализ" КЛРШ

Comment thread REPORT.md

Цель проекта — получить
- **сжатую** ($o(n)$ доп. памяти)
- и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно оставить так, но отмечу, что я никогда не ставил задачи сделать "асимптотически быстрое" решение, я ставил задачу сделать "просто быстрое" решение на размерах в диапазоне хотя бы до 2^32

Comment thread REPORT.md
- **сжатую** ($o(n)$ доп. памяти)
- и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы)
- структуру, поддерживающую типовой набор запросов:
- `rank` / `select` по битам,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что такое rank/select? Я то знаю, откуда это знает зритель?

Comment thread REPORT.md
- и **быструю** (все операции выполняются за $O(\log n)$ времени и используют различные оптимизации, существенно уменьшающие константы)
- структуру, поддерживающую типовой набор запросов:
- `rank` / `select` по битам,
- операции с **excess** (префиксная сумма с шагами +1/−1),

Copy link
Copy Markdown
Owner

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)

Comment thread REPORT.md
- `select`: `O(n)`,
- `range_min/max` и `mincount/minselect`: `O(j-i)` и т.п.

Плюсы:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Как-будто плюсы и минусы не информативны

Comment thread REPORT.md
- структуру, поддерживающую типовой набор запросов:
- `rank` / `select` по битам,
- операции с **excess** (префиксная сумма с шагами +1/−1),
- `fwdsearch` / `bwdsearch`,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Опять же, что за операции непонятно. Если ты собираешься всё это словами проговаривать, то скорее всего дальше уже просто никто слушать не будет.

Наиболее разумный вариант -- написать, что основное назначение реализация навигации по правильной скобочной последовательности, т.е. расписать что такое enclose желательно с картинкой, а вспомогательные операции просто перечислить

Comment thread REPORT.md
## 2. Постановка задачи и требования

### 2.1. Входные данные
- Битовая строка `'0'/'1'` или массив 64-битных слов `uint64_t` с укладкой **LSB-first** (младшие биты — более ранние позиции).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Способ представления битовой строки не относится к твоей работе, детали о uint64_t и lsb-first излишние.

Comment thread REPORT.md
- `select` в блоке делается через перебор установленных битов (внутри 64 бит),
- удобно читать байты/16-битные фрагменты для LUT и SIMD.

#### 3.2.2. Идея блокирования и дерева

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

разделения на блоки?

Comment thread REPORT.md
### 4.2. SIMD (AVX2) для поиска по префиксу в листе

В реализации предусмотрена опциональная поддержка AVX2 (`PIXIE_AVX2_SUPPORT`):
- берутся 16 бит (`get_u16`),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лично я ничего не понял из последующего описания

Comment thread REPORT.md
- для `minselect` — заранее генерируется `q` в допустимом диапазоне (через `mincount`).

### 7.2. Поддерживаемые параметры бенчмарков (как аргументы командной строки)
- `--min_exp`, `--max_exp` — диапазон размеров `N = 2^e`,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем вся эта информация? Лучше добавь конкретные картинки

@Malkovsky
Malkovsky merged commit 687a607 into main Feb 6, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants