[
https://issues.apache.org/jira/browse/CASSANDRA-12153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15368576#comment-15368576
]
Tyler Hobbs commented on CASSANDRA-12153:
-----------------------------------------
bq. If we are really looking for speed, I think that we should have some field
variables for hasIN, hasEq
When profiling with the patch applied, {{hasIN()}} drops to ~0.02% of the time,
so I think that's fast enough.
bq. Any reason not to do the same with...
Seems like we might as well do that too. Those didn't show up for the simple
query I was profiling, but they might be in the hot path for some other types
of queries.
> RestrictionSet.hasIN() is slow
> ------------------------------
>
> Key: CASSANDRA-12153
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12153
> Project: Cassandra
> Issue Type: Improvement
> Components: Coordination
> Reporter: Tyler Hobbs
> Assignee: Tyler Hobbs
> Priority: Minor
> Fix For: 3.x
>
>
> While profiling local in-memory reads for CASSANDRA-10993, I noticed that
> {{RestrictionSet.hasIN()}} was responsible for about 1% of the time. It
> looks like it's mostly slow because it creates a new LinkedHashSet (which is
> expensive to init) and uses streams. This can be replaced with a simple for
> loop.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)