Skip to content

Instantly share code, notes, and snippets.

@omo
Created February 8, 2012 07:32
Show Gist options
  • Save omo/1766470 to your computer and use it in GitHub Desktop.
Save omo/1766470 to your computer and use it in GitHub Desktop.
AtomicString AtomicString::lower()
AtomicString AtomicString::lower() const
{
// Note: This is a hot function in the Dromaeo benchmark.
StringImpl* impl = this->impl();
if (UNLIKELY(!impl))
return *this;
RefPtr<StringImpl> newImpl = impl->lower();
if (LIKELY(newImpl == impl))
return *this;
return AtomicString(newImpl);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment