This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This Requires SSE 4.2, Steam hardware survey says this is supported on 97.81% of PCs | |
// This is REALLY fast, even with -O2 it usually beats the the CRT Implementation | |
// | |
// In most of my tests this is around 50x faster with small strings with -Od (with -O2 its closer to 10-15x faster) | |
// | |
static size_t | |
FastStringLength(char* String) | |
{ | |
size_t Result = 0; | |
__m128i* Memory = (__m128i *)String; |