path: reduce path code size
This is mainly a code cleanup. It reduces the overall code size and code indentation of the path
module and since it's quite complicated code, I thought it makes sense to try to have the code base as small and readable as possible.
The performance is pretty much identical. There are a view small plus or minus percent on some cases without any clear performance difference. I changed the benchmarks as well to better reflect actual user input.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines