# Evaluating Range Predicates

DevFeed: [Evaluating Range Predicates](<https://devfeed.tech/articles/evaluating-range-predicates-25644.md>)

Original publisher: [Read original article](<https://richardstartin.github.io/posts/range-predicates>)

Author: Richard Startin's Blog

Published: 2022-03-12T00:00:00Z

Content type: article

Language: en

Sources: [Richard Startin's Blog](<https://devfeed.tech/sources/richard-startin-s-blog.md>)

Topics: [Data analysis](<https://devfeed.tech/topics/data-analysis.md>), [Java](<https://devfeed.tech/topics/java.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [java](<https://devfeed.tech/tags/java.md>), [roaring](<https://devfeed.tech/tags/roaring.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

This article examines filtering transaction data by range predicates in Java. It compares stream-based linear filtering with reordered conditions and binary search on time-sorted data, discussing branch misses and the potential benefits of indexed data structures such as RoaringBitmap.

## Source excerpt

Suppose you are doing some kind of data analysis in Java, perhaps you are analysing transactions (as in sales made). You have complex filters to evaluate before performing a calculation on Transaction objects.