switch / if statement, efficiency question

by Kent Yip » Thu, 30 Apr 2009 01:44:23 GMT


Sponsored Links
 a switch statement is made for nested if statements.

switch statement is greate if you have a bunch of selections, to make a
switch statement perform better you have to look at what user will likely
selection the most, and implement that case on the top most case in the
switch. Accessing that case will be faster than accessing cases at lower end
of the switch statement.








--~--~---------~--~----~------------~-------~--~----~



switch / if statement, efficiency question

by Kent Yip » Thu, 30 Apr 2009 04:35:45 GMT


 thx fadden for the info.






--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. HTC EVO RTSP issues... Anyone experience issues in this area?

Looks like you aren't alone...

http://forum.androidcentral.com/htc-evo-4g/26814-htc-streaming-media-player-problems.html

2. How can I get the EditText information from Inputmethod?

hello, i'm making a soft-keyboard. but some problems are encountered.

i need editor's maxLength information, but.. EditorInfo has not
'android:maxLength' information.

how can i solve this problem?

please help. thanks

-- 

3. how to tether 3G mobile on android programmatically using Android SDK

4. Dynamic add view to scrollview problem

5. Get around the inability to alias columns coming from ContactsContract in 2.2

6. MediaPlayer getCurrentPosition problems on Android 2.2

7. Android Updater SDK (Manager) problem trought proxy