Skip to content

Conversation

@CurtHagenlocher
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher commented Feb 17, 2025

I noticed that the ValueAt helper had compiled into some very inefficient IL, so I decided to improve its performance by replacing with a simpler switch statement. I then realized that in AdbcDataReader, we don't need to do the type check on every row because it's the same underlying Arrow type for the entire column -- so it's faster to get a delegate once and keep using the same delegate for the entire data set. Benchmarking came up with these results when testing through AdbcDataReader.GetValues:

Method Mean Error StdDev
Original 6.263 s 0.0575 s 0.0538 s
New ValueAt 5.400 s 0.0424 s 0.0397 s
Getter 4.650 s 0.0281 s 0.0249 s

@github-actions github-actions bot added this to the ADBC Libraries 17 milestone Feb 17, 2025
@CurtHagenlocher CurtHagenlocher merged commit 8dade5b into apache:main Feb 18, 2025
6 checks passed
@CurtHagenlocher CurtHagenlocher deleted the FasterValueAt branch February 18, 2025 20:38
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.

1 participant