View Single Post
Old 10-13-2012, 07:49 AM   PM User | #45
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by bardonw View Post
The only problem I have is the fact that in that version, the array of ordinals is created every time the function is run. That means that the function will run slower if run on many thousands of numbers. Still, for most cases, that function will do. I just know that people like John Resig or Douglas Crockford would not like me endorsing that as the best solution.
I would doubt if there was any perceptible slowness (milliseconds perhaps) even if run on "many thousand of numbers". And where in reality is that required? Does the need to generate 1st to 123456th ever really arise?
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote