On Sep 26, 2007, at 6:09 AM, Martin Ström wrote:

> Try benchmarking this solution as well, it doesn't even use an for
> loop which could make it even a bit faster:
>
> String.prototype.times3 = function(count) {
>    return new Array(count + 1).join(this);
> }

In general I think these endless debates over the performance of  
methods like String#times, $w, et al are unnecessary and  
counterproductive.

That said... wow!  What a beautiful and succinct way of approaching  
the problem.  I really like your thinking, Martin.

-sam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to