URL classification usually happens at a time when the main thread is busy so avoiding the heap allocations will also avoid blocking the main thread on jemalloc lock contention or cross CPU cache misses. This also avoids the nsComponentManagerImpl::LookupByContractID lock. Combined, this improves performance of mozilla::safebrowsing::SafebrowsingHash::FromPlaintext by a lot: before: 84ms - https://share.firefox.dev/4eHdIBk after: 12ms - https://share.firefox.dev/4fB6AaS Differential Revision: https://phabricator.services.mozilla.com/D229716