How to avoid or minimise use of check/conditional statement in my scenario?

Posted by Muneeb Nasir on Programmers See other posts from Programmers or by Muneeb Nasir
Published on 2014-08-19T09:50:40Z Indexed on 2014/08/19 16:29 UTC
Read the original article Hit count: 232

I have scenario, where I got stream and I need to check for some value. If I got any new value I have to store it in any of data structure.

It seems very easy, I can place conditional statement if-else or can use contain method of set/map to check either received is new or not.

But the problem is checking will effect my application performance, in stream I will receive hundreds for value in second, if I start checking each and every value I received then for sure it effect performance.

Anybody can suggest me any mechanism or algorithm to solve my issue, either by bypassing checks or at least minimize them?

© Programmers or respective owner

Related posts about java

Related posts about algorithms