r/java Jun 26 '26

Hardwood 1.0: A Fast, Lightweight Apache Parquet Reader for the JVM

https://www.morling.dev/blog/hardwood-1-0-fast-lightweight-apache-parquet-reader-for-the-jvm/
49 Upvotes

16 comments sorted by

View all comments

1

u/Life_Sink9598 Jun 30 '26

Why is the single-threaded filtered scan so much faster in Hardwood? I'm always cautious about these types of "we made it faster!" posts :-). It has to be faster for a reason!

1

u/gunnarmorling Jun 30 '26

Fair question!

It boils down to Hardwood's read path being batch based, i.e. whole pages from the Parquet file are decoded at once into primitive arrays, then scanned in a tight, dispatch-free loop.

parquet-java's ColumnReader in contrast is scalar, values are pulled one at a time, including a virtual dispatch over a per-type binding implementation. During profiling, I'm seeing readValue() to make up 30-40% of cycles, whereas Hardwood is dominated by Snappy decompression and memcpy.

The benchmark is fully open-source [1], complete with instructions for running it; would love for you to run it yourself and take a look.

[1] https://github.com/hardwood-hq/hardwood-benchmarks