last day (15 days later) » 

2:37 PM
Almost no one likes Javascript
3
And besides, the jsperf is working with an array, and not with the arguments object.
That is another difference
 
Anyway... that wouldn't really change the way I would write for's, they are for's and there isn't any compelling reason to write differently I used to.
And that just made my point grow if even sligthly
 
@BrunoCosta Nope, just made us look silly, discussing Javascript
 
@IsmaelMiguel Don't care :p
 
But since you are talking about performance, I provided you a pointer
 
I actually did read about what you said in past. And the conclusion is about the same it doesn't really makes sense to change the way you code because of it
 
2:43 PM
Are you talking about performance?
 
Nop
xD
 
@BrunoCosta You wrote an answer talking about performance. I outperformed you. On Internet Explorer! That says something about the superiority of my for loop.
 
@IsmaelMiguel That's fine, as long as you understand the answer I gave and compliment it
 
@Mat'sMug That's opinion based
@BrunoCosta I accept your answer. I'm just saying that your answer isn't as performant as it should be, when you were talking about performance.
 
@IsmaelMiguel Got your point. But getting from O(n^2) to O(n) is what matters most and something that you have to think and take your time and engineer. While writing code differently because of performance is different, of course it's important to do that, however you should only look at that if it becomes a bottleneck
 
2:56 PM
100ms in 16 executions is something you should look at, when talking about performance.
 
@IsmaelMiguel Acoording jsperf that difference is not that high
 
@BrunoCosta That test is biased and faulty.
 
@IsmaelMiguel I don't believe it is. Also I tested the other example you gave me and couldn't come to a conclusion after all. All I saw was different values in the console
 
I'll add more data later on and improve the network handling
@BrunoCosta Calculate them
Sum them and you'll see the time diference
@Mast We are
It is related to an answer that @BrunoCosta gave
It's not just chatty chat
 
Sometimes they would benefit me for sometimes they wouldn't
Sorry guys xD
rr I don't think I'll have anything to add in that <.< xD
 
3:02 PM
I have.
You're talking about performance.
I point out a bottleneck
But you completely ignore it
100ms is a lot
 
It's not a bottleneck and t's not 100ms
 
Make the calculations
Run each code 10 times
 
jsperf make them for me in a more safe envoirment
 
Then calculate the times
 
andthat's because it's so good
 
3:04 PM
@nhgrif Wrong room...
*biased
 
@IsmaelMiguel No.
 
why is it?
 
o.O
Because they are global variables
 
they were talking about jsperf weren't they?
 
3:06 PM
Why does that matther? Do I need to wrap in a function and show you exactly the same thing?
 
Yes, wrong room
@Malachi We were talking about an answer.
 
I see
 
It could be PHP, C, Javascript, MarioGolf, C#, Ruby, XML....
It was about an answer
 
oh I see
 
I did that
Each execution is isolated from the next one
 
3:07 PM
hold on I will move those messages
 
Thanks
 
that doesn't work
you can't measure that way
 
How so?
You execute your code once, in a new environment each time
 
42 messages moved from Javascript Libraries
 
After n executions, you sum the times
Then run the 2nd version that same n times
And sum the times
Then you compare
How can't I do it this way?
 
3:10 PM
That shouldn't be how you test the permornace of a method
 
Then how should it be?
 
There's need to be a warmup where you execute all the code a number of times
 
That polutes stuff
 
so in cpus can improve their efficiency, warmup cache
 
You can easily change it to run n times
 
3:13 PM
In a perfect enviornment you would also force the same cpu to execute always the same code but I don't think you can do that with browsers
 
Can you paste here the links?
 
That was some article that a user of CR gave me to read about perforamnce tests
I think it's ok if you don't abuse it and you have to show a point
didn't read the legal though
Hey malachi were you interested in this talk? xD
 
@BrunoCosta lol just dropped in...lol
you gotta @ ping me, I almost didn't know you were talking about me
 
We aren't
 
@Malachi it wasn't the case actually just wondering if you were here to support me (6)
@IsmaelMiguel I hope you can now understand why you can't just execute the code for just once in a envorment each time. Even if it gives you good results every single time it doesn't really matter if in the long run (as the code is running and being optimizied to the cpu with cache system and branch prediction and instuction optimization etc...) it all comes to almost the same
in order to show if something is a bottleneck or not you can't make tests in a new enviornment everytime
 
3:23 PM
I don't know what is going on, I am trying to get some distance from chat at the moment so I can implement google API for Zip code to City, State on a form.
 
however I admit it this was a bottleneck then a way to improve it would be to swap your for style with mine
 
inline length: 48.231ms
fiddle.jshell.net/:46 inline length: 64.800ms
var length: 67.985ms
fiddle.jshell.net/:46 var length: 76.227ms
 
Firefox?
 
chrome
 
3:26 PM
Weird
Firefox is barthing weird numbers
 
that's my point you can't make performance tests that way. It's true that we would also need to have the exactly same enviornment. But jsperf is a place were you can accomplish the best possible numbers software wise
well maybe not the best but I'm pretty sure they were pretty serious about it!
 
They were.
But anyway, do as you wish
You have a performance hole, and I pointed it
 
I'll try to code some for's that way in js maybe :p
I think we both learned from this, am I right?
 
Yeah. Never nitpick on performance.
 
And do perfromance tests properly!
 
3:37 PM
I did. Almost
 
Almost is the keyword there :)
 
I'm aware of that
 

last day (15 days later) »