Allow developer to resize the dictionary ? #288
penguin-wwy
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
~10% speedup on microbench is not so nice.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In many scenarios, a dictionary is used to cache something. For example,
pyspark
access spark object bypy4j
, in python code, everyJavaObject
need to cacheJavaMember
which can be accessed.The number of objects that need to be cached can be expected in this situation. So, if the developer case resize the cache dictionary, the
dictresize
duringinsertdict
can be reduced.I test micro-benchmark for insert operations between resized-new dict and common-new dict
Speed up ~10%
Edit 1:
Speed up 4~5%
Beta Was this translation helpful? Give feedback.
All reactions