GNIRTS
Package gnirts was inspired by this twitter comment
It's a simple set of benchmarks to show the many different (and occasionally incorrect) ways to reverse a string.
Go lacks a built in method for string reversal, leaving people to just do it themselves.
This leads to different implementations which don't always work for all cases. For example, many of the methods in this library will not work with combination-characters in Unicode. Follow the links to see the original place they came from - the fastest result is not always the most correct one.
How to use gnirts
Do not import it.
Do not import it.
Do not import it.
It's meant as a benchmark repository just to show the different ways you could do it, and what the tradeoffs are.
Test it by running the following: make bench
or make benchmem
Contributing
Feel free to open PRs to add new methods, or to suggest better way to organize them, etc, or to better catalogue what each method excels at (for example, works with combination-characters or not, etc)
If you want to contribute code, make sure it passes the 3 analysis tools by running make deps
followed by make check