Home » Developing U++ » U++ Developers corner » String == optimization hint...
String == optimization hint... [message #18378] |
Thu, 25 September 2008 11:29 |
![](https://www.ultimatepp.org/forums/images/custom_avatars/3.png) |
mirek
Messages: 13984 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
|
|
|
Goto Forum:
Current Time: Tue Jun 11 12:29:04 CEST 2024
Total time taken to generate the page: 0.01986 seconds
|