will there be a good perf improvement by avoiding extra get call

27 views
Skip to first unread message

Monu Agrawal

unread,
Mar 1, 2018, 4:55:25 AM3/1/18
to lev...@googlegroups.com
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

Monu Agrawal

unread,
Mar 1, 2018, 5:01:55 AM3/1/18
to lev...@googlegroups.com
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
'Make Your Own Way'
    Monu Agrawal
Reply all
Reply to author
Forward
0 new messages