[PATCH] libstdc++: Improve performance in basic_string::rfind() === [Source](https://github.com/25077667/gcc/tree/test_rfind_perf) :::success 🎉🎉🎉 performance comparism placeholder 🎉🎉🎉 ::: # How to verify? ## Compile the local gcc ```shell= ./configure --enable-languages=c,c++ --disable-multilib make -n $(nproc) # You also could verify the built-in unit tests make check-target-libstdc++-v3 ``` ## Compile the test suite This makefile dependens on basic UNIX commands (sed, grep) Please make sure you have those utilities. ```shell= cd local_test make # Run the testsuit ./testsuite-after ``` ## Compare before and after Because the latest change is 7-years ago(for adding std::string_view), and the changes of algorithm is about 20 years ago. I would assume you have the non-patched binary on your machine default environment. ```shell= make before # Using the default environment's gcc and libstdc++.a make after # Using the patched version of gcc and libstdc++.a # Run before and after ./testsuite-before ./testsuite-after ``` # How it works # Further optimizations