1.0.0
Initial release.
pg_stringtheory is a CPU-specific optimization for string comparison operators using SSE4.2 on x86_64 platforms, and SWAR64 on aarch64 and arm64 platforms. It implements two functions:
-
stringtheory.equals(a TEXT, b TEXT)
- returns BOOLEAN, true if there is an exact match, and false if there is not. -
stringtheory.strstr(haystack TEXT, needle TEXT)
- returns INTEGER, the position of where the needle is found in the haystack, or -1 if it is not found.
Note that this extension will not run on all CPUs and architectures. In the future, CPU features may be detected (e.g. using google/cpu_features), but this is not currently implemented.