Hi Julian,
My project massively calls the String::isEmpty() function.
It seems that this function can be optimized when the underlying character string is UTF8 or UTF16 .
Because of the complexity of CharPointer_UTF8::operator[] and CharPointer_UTF16::operator[], I replaced the following code of juce_String.h :
inline bool isEmpty() const noexcept { return text[0] == 0; }
inline bool isNotEmpty() const noexcept { return text[0] != 0; }
by this one:
inline bool isEmpty() const noexcept { return text.isEmpty(); }
inline bool isNotEmpty() const noexcept { return !text.isEmpty(); }
With my project built with Visual Studio 2010 SP1 in RelWithDebInfo x64 mode,
and running on Windows 7 SP1 64 Pro with Intel Core i7 960 3200Mhz.
For those kind of juce::CharPointer I obtain a performance gain of 33%.
Thanks for your concern about this.
