For those who live in a world with seconds:
0.000000569 seconds
Sorry, but I just couldn't resist posting that.
Mind you: I do not really care that much (you might have noticed the emoticon I uses).
There are however plenty of speedfreaks around here.
In the distant past I had a discussion in the bugtracker that my new implementation of some conversion to string was 4 times slower than the original.
The original however gave you the worng results.
My opponent in that discussion found that a wrong result was less of an issue than speed.
Even then you would have to do > 100 thousand conversions to notice the difference, which actually might be a use case, but in such a scenario the input was probably read from a file, which would have been the bottle neck for the entire operation (IO is way slower than conversion code).
You code has the added advantage it can be used for strings of any length (my code could easily be adopted for that if the need arises) and it can do 2 jobs (mine only one).
So, no hard feelings I hope?
Bart