Tcsc_: a lot of it depends.

 
Kalinoski: I would tell that to employers

Paulhus: Vafiadis: o i was recently testing another one. but it had some issues. and yea. the basic one mostly. can you recommend sth else?

Vafiadis: Paulhus: I found Console2 to be a decent alternative. Used it for a while with cygwin and zsh, but eventually I just switched to linux at work. It took a little configuring but it seemed nicer overall with or without cygwin

Lango: No but seriously whats with this airline food

Kenan: What is the advantages of a sum function that does nums.forEach. instead of a plain old for loop?

Kalinoski: Chamnanphony: use reduce

Knappert: I know, in nums.forEachfunction item, ., item is the “this” inside the callback.

Keitzer: Element, index, array iirc

Kalkman: Chamnanphony: just better reasoning about what you’re doing. no reason to use a loop if you don’t need a loop

Kalkman: The engine can optimize better

Vafiadis: Also modularity/composability/reusability

Vafiadis: You can define your reducer function and plug it in

Paulhus: Vafiadis: i am using both systems.practically. maybe i can’t resist to plead for the underdog. which would be windows in forums like that i ***ume :

Kalinoski: 0.forEachfunction v { console.logthis; }, ‘woop’

Mate: Kalinoski: undefined; Console: object ‘woop’

Lango: I had this discussion with a dev at my workplace. array prototype functions are more suited to iterating over an array, but when speed is absolutely 100% the most important thing like if your looping inside a function that gets called every time requestAnimationFrame goes then you can use a more “manual” structure like a loop

Kalinoski: Second argument fellas

Vafiadis: I just use whatever annoys me least for a specific task. so the one I use most of the time is whichever one annoys me least for my current balance of tasks

Kalkman: Lango: currently. that isn’t necessarily always true

Mate: Deltab: undefined; Console: ‘x’, 0, ‘x’, ‘y’, ‘z’, ‘y’, 1, ‘x’, ‘y’, ‘z’, ‘z’, 2, ‘x’, ‘y’, ‘z’

Vafiadis: I got Office working almost seamlessly in Linux, after that most other differences were no big deal

Kalkman: Lango: plus really if that’s your actual bottleneck you must be working on some insanely tight code

Lango: Lemme see if I can find it, its in an open source project 1 sec

Kalinoski: Yes the array itself is the third parameter of the callback you p*** as the first argument to forEach

Vafiadis: Or you’re like tcsc_ and work between frames so often that the small GC caused by the function calls’ data allocation causes frames to skip

Lango: No, it’s for a foundation at my school who uses JS to do physics simulations

Lango: Https://github.com/phetsims/scenery/blob/master/js/nodes/Node.js

Lango: Just ctrl+f for “for ”

Lefort: You can generally avoid dropping a frame even if there’s a gc if you can do your frame in under 10ms this also depends on your allocation habits though

Newmark: And i avoid forEach more because it adds profiler noise more than concern about the allocation of the closure

Furbush: But map and etc. definitely i avoid for allocation reasons.

Lango: Thats their reasoning here when I brought it up at a meeting

Vafiadis: I’ve also found that using iterators with higher-order methods, or using transducers for same, overcomes a lot of the speed limitations of not mutating your structure in place by eliminating the intermediate structures and doing it all lazily

Asiello: Hello can local storage or cookies be updated live on 2 tabs at the same time same domain;

Puglia: Vafiadis: i can’t imagine that doesn’t add all kinds of stuff to the profiler and you still have a bunch of small allocations there, i believe

Stolarski: At least for transducers

Vafiadis: Tcsc_: a lot of it depends on what you’re doing and how large the array is more gains for larger structures but jlongster’s transducers.js shows a pretty good perf gain, if not 100% on par with a native loop