Discussion:
[leveldb] will there be a good perf improvement by avoiding extra get call
Monu Agrawal
2018-03-01 09:55:21 UTC
Permalink
Hi,
My code needs to behave differently based on if key is present in leveldb.
If key is present, I need to get the value as well.
Since this code is accessing the data using a wrapper library which
provides containsKey method which internally tries to get the value using
get(). So actually my code is calling get method twice if key is present.

I want to know if there will be a measurable perf improvement if I avoid
this extra get call by changing our library's signature (given that the key
will mostly be present in the cache second time).


--
Thanks
Monu Agrawal
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Monu Agrawal
2018-03-01 10:01:50 UTC
Permalink
I am asking this specifically for android.
If this is not the right forum to ask such question, sorry for spam. Please
redirect me to the right forum.


--
Create social impact right now through Rang De
<http://www.rangde.org/invite/XXppMJorp/Monu>
'Make Your Own Way'
Monu Agrawal
Post by Monu Agrawal
Hi,
My code needs to behave differently based on if key is present in leveldb.
If key is present, I need to get the value as well.
Since this code is accessing the data using a wrapper library which
provides containsKey method which internally tries to get the value using
get(). So actually my code is calling get method twice if key is present.
I want to know if there will be a measurable perf improvement if I avoid
this extra get call by changing our library's signature (given that the key
will mostly be present in the cache second time).
--
Thanks
Monu Agrawal
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...