On 9/5/07, jdalton [EMAIL PROTECTED] wrote:
In some cases, other functions build off of these base functions and
the slow down can eventually grow For example using large arrays
or calling a method 1000+ times that make heavy use of the Enumerable
helpers is slow compared using a
Am 05.09.2007 um 04:11 schrieb jdalton:
Other rant: Also I don't see a valid argument for not using opening
and closing conditional brackets { }...
Its a few brackets here and there that would make the code soo much
less cryptic. I think that gzipping and this would still keep the
filesize
Hi Thomas,
I concede the $w() point.
I did not know that using brackets is slower.
How much so and are there benchmarks for that claim?
I agree that:
If(blah) return;
Is fine, I do little stuff like that in my code, but lets use a real
example:
http://pastie.caboo.se/private/y6hmgibpglrlwlknms
Ultimately, this and several other topics come down to the fact that
Prototype is the JavaScript library for Ruby programmers. This isn't
bad, it's just something that non-Ruby coders like myself have to come
to grips with. Prototype prefers method names like uniq rather than
unique, for
On Sep 5, 2007, at 7:28 AM, Thomas Fuchs wrote:
Am 05.09.2007 um 16:22 schrieb jdalton:
I did not know that using brackets is slower.
No, that's just a claim. :)
I'd welcome benchmarks for this (i've the feeling it's not really
measurable, but you never know...).
Thomas, brackets once
On 9/3/07, Tobie Langel [EMAIL PROTECTED] wrote:
FYI, some rough benchmarking in Safari using the benchmarking function
of unit tests:
benchmark(function(){
var colors = $('blue red green violet');
}, 1)
benchmark(function(){
var colors = ['blue',
In some cases, other functions build off of these base functions and
the slow down can eventually grow For example using large arrays
or calling a method 1000+ times that make heavy use of the Enumerable
helpers is slow compared using a traditional for loop.
I think that using the array is
These lines occur only once when loading the framework. The difference is
insignificant.
You're right. Yet readability and clarity is. Also, there's more
chance to make error in a concatenated space-containing sting, like
it's in lines #2368-2369, than in an array of strings.
$w('colSpan
Andrew Red wrote:
Gentlemen,
I notice a function which breaks a string into array of words ( $w() )
is used along the code very indiscriminately just when a simple array
would suffice.
...
Andrew,
I'm also new to the Ruby world. It seems that the $w() function has an
analogous %w() in
On 9/3/07, Andrew Red [EMAIL PROTECTED] wrote:
So, summing you up, each time before we have an vanilla array from the
spaces-delimited string we go through:
string - stack hop - stack hop - replace(/^\s+/, '') - replace(/\s+
$/, '') - stack back hop - branching - split(/\s+/) - stack back
)) Okay, okay.
Your way. )
On Sep 3, 10:19 pm, Mislav Marohnić [EMAIL PROTECTED]
wrote:
On 9/3/07, Andrew Red [EMAIL PROTECTED] wrote:
So, summing you up, each time before we have an vanilla array from the
spaces-delimited string we go through:
string - stack hop - stack hop -
FYI, some rough benchmarking in Safari using the benchmarking function
of unit tests:
benchmark(function(){
var colors = $('blue red green violet');
}, 1)
benchmark(function(){
var colors = ['blue', 'red', 'green', 'violet'];
}, 1)
Info: Operation
12 matches
Mail list logo