how to avoid or minimise use of check/conditional statement?

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 10:30 UTC
Read the original article Hit count: 227

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

well 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'll receive hundreds for value in second, if i start checking each and every value i received than for sure it effect performance.

Any body can suggest me any mechanism or algorithm that solve my issue. either by bypassing checks or atleast minimize them?

© Programmers or respective owner

Related posts about java

Related posts about algorithms