U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » String == optimization hint...
String == optimization hint... [message #18378] Thu, 25 September 2008 11:29
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
BTW, due to nature of new String implementation:

void Foo()
{
    String s = ...
    if(s == "myfoo") ...
}


is much faster written as

static String s_myfoo("myfoo");

void Foo()
{
    String s = ...
    if(s == s_myfoo) ...
}


Mirek

[Updated on: Thu, 25 September 2008 11:32]

Report message to a moderator

 
Read Message
Previous Topic: Upp Idea -> MultiTouch support
Next Topic: Has "file index" any fans?
Goto Forum:
  


Current Time: Tue Apr 28 10:42:50 GMT+2 2026

Total time taken to generate the page: 0.00393 seconds