-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay Presto map hash table build when lookups are few #22587
base: master
Are you sure you want to change the base?
Conversation
return 2 * i + 1; | ||
} | ||
} | ||
catch (Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per Effective Java, you should almost never catch Throwable. What's the more specific exception here?
return 2 * i + 1; | ||
} | ||
} | ||
catch (Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
return 2 * i + 1; | ||
} | ||
} | ||
catch (Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
return 2 * i + 1; | ||
} | ||
} | ||
catch (Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
return 2 * i + 1; | ||
} | ||
} | ||
catch (Throwable throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
@pranjalssh, @mbasmanova : Is there an equivalent for this in Prestissimo engine ? My intuition is that because of runtime optimizations in HashTable build we might not need this. But just thought to ask anyways. |
Add session property
map_lookups_without_hashtable
, which denotes how many map lookups will be done using linear search, before resorting to hash table build of the entire map. Default is 0.Usually hashing cost is high enough that its best to not build the hash table for map objects. Only when number of lookups exceed some threshold, we should resort to build the hashtable. This change controls that using a session prop.