Skip to content

Implemented lil optimization - #25

Merged
NoahP-K merged 31 commits into
mainfrom
noahpk/implement-lil-optimization-in-art
Jul 31, 2025
Merged

Implemented lil optimization#25
NoahP-K merged 31 commits into
mainfrom
noahpk/implement-lil-optimization-in-art

Conversation

@NoahP-K

@NoahP-K NoahP-K commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

Changed files: ArtNode.h, ART.h
Created files: QuART_lil.h, ArtNode_lil.h

ArtNode.h: Removed definitions of insertNodeX methods to avoid circular dependencies across files.
ART.h: Added generic fast path fields to ART class.
QuART_lil.h: Implemented QuART class with lil inserts.
ArtNode_lil.h: Added insertNodeX functions removed from ArtNode.h and modified them to also follow lil logic.

NoahP-K and others added 21 commits June 20, 2025 10:35
… 1 to 256 in order but becomes inconsistent beyond that.
…f each node on the fast path instead of the length of the fast path.

Insert also no longer uses prefixMismatch to determine if a node can be inserted to the fast path and instead directly compares keys. The method canLilInsert was added to the QuArt_lil class to perform this check.
The code now passes tests with 10000 sorted entries but struggles to complete execution with 100000 or more sorted entries, seemingly due to timeout.
…a correct tree but queries for values above 255 return null.
…est on larger data collections with varying degrees of sortedness.
@NoahP-K
NoahP-K requested review from cangokmen and ramananeesh July 24, 2025 16:37
@NoahP-K NoahP-K linked an issue Jul 24, 2025 that may be closed by this pull request
@NoahP-K
NoahP-K marked this pull request as draft July 24, 2025 16:37
@ramananeesh
ramananeesh requested a review from Copilot July 24, 2025 17:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements optimization strategies for the Adaptive Radix Tree (ART) data structure by introducing "QuART" (Quick ART) variants with fast-path insertion mechanisms. The changes restructure the codebase to support multiple tree implementations and add new QuART variants that optimize insertion performance through different fast-path strategies.

Key changes include:

  • Refactoring of ART node insertion methods to support different tree variants
  • Implementation of QuART_lil and QuART_tail classes with optimized insertion paths
  • Addition of benchmarking infrastructure and experimental evaluation tools

Reviewed Changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
trees/QuART_tail.h New QuART variant implementing tail-based fast path optimization
QuART_lil.h New QuART variant implementing "lil" (likely "last in line") fast path optimization
ArtNode_lil.h Node insertion methods for the lil optimization variant
ArtNodeNewMethods.cpp Tail-specific insertion methods for QuART_tail variant
ART.h Enhanced base ART class with fast path fields and verification methods
ArtNode.h Refactored to remove insertion method definitions and fix method signatures
run.cpp New benchmarking executable for comparing tree variants
run_experiments.sh Automation script for running comprehensive experiments
main.cpp Updated to use QuART_lil by default and modernized loop variables
test_range_query.cpp Fixed rangelookup method call signature
Helper.h Added integer-to-array conversion utilities
Chain.h Fixed logical operator in range query functionality
CMakeLists.txt Updated build configuration for new executables
Comments suppressed due to low confidence (1)

Comment thread main.cpp Outdated
Comment thread main.cpp Outdated
Comment thread insert_profiling.cpp Outdated
Comment thread QuART_lil.h Outdated
Comment thread Helper.h Outdated
Comment thread run_experiments.sh
@ramananeesh ramananeesh added the enhancement New feature or request label Jul 24, 2025
NoahP-K and others added 5 commits July 25, 2025 10:48
Updated variable type

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated variable type

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated variable type

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Removed self-referencing variable initialization.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated arrToInt parameters

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cangokmen

Copy link
Copy Markdown
Contributor

Also update run.cpp, run_experiments.sh and README to include lil

@cangokmen cangokmen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added some comments, lmk if you have any questions or other ideas

Comment thread Chain.h Outdated
Comment thread QuART_lil.h
Comment thread .gitignore
Comment thread test_range_query.cpp
Comment thread workloads/10000000_sorted.txt
Comment thread workloads/createdata_N1000_K10_L10_S1234_a1_b1_P252.txt
Comment thread main.cpp Outdated
Comment thread ArtNode_lil.h Outdated
@ramananeesh

Copy link
Copy Markdown
Collaborator

Moving the PR from draft status into Ready for Review

@ramananeesh
ramananeesh marked this pull request as ready for review July 26, 2025 02:03
@NoahP-K
NoahP-K requested a review from cangokmen July 28, 2025 17:11

@cangokmen cangokmen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Comment thread ART.h
Comment thread ArtNodeNewMethods.cpp Outdated
Comment thread ArtNodeNewMethods.cpp Outdated
Comment thread ArtNodeNewMethods.cpp Outdated
Comment thread ArtNodeNewMethods.cpp Outdated
Comment thread CMakeLists.txt Outdated
Comment thread Helper.h
Comment thread trees/QuART_tail.h
@NoahP-K
NoahP-K requested a review from ramananeesh July 31, 2025 17:08

@ramananeesh ramananeesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@NoahP-K
NoahP-K merged commit 96164c5 into main Jul 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement "lil" optimization in ART

4 participants