3 ms·
To check what the actual zero-abstraction version of the select_all_matches function would run in, I created a simple c++ function that accepts the string buffe
by alex_smart 3y ago
To check what the actual zero-abstraction version of the select_all_matches function would run in, I created a simple c++ function that accepts the string buffer and the simply calls buffer.find until it finds all matches and pushes the match results into a vector. Result: with the same file and search string, it runs in all of 0.2 ms. So we are still off by a factor of at least 10 before we get to call it a "zero-cost" abstraction.