Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Tayo8975yIf only there wasn't a huge performance difference between a regular for loop and a forEach function
-
@Tayo If you care about the minimal performance difference the two have, you should not be writing JavaScript.
-
@PrivateGER Still makes a difference on bulk operations. Can make an effective difference using webWorkers, for example.
-
@010001111 If you're doing serious bulk processing with Javascript of all things, you're doing something wrong. Most heavy stuff should be done by the server.
-
@PrivateGER Our application fetches a ton of table data (35+ columns, 5000+ rows) obviously loaded in chunks from the server. But for faster app and offline usage, we store and diff all these rows to estimate the most-likely relevant data, that has been loaded before.
-
@010001111 Yeah, you should definitely look into WASM for that. It's practically made for such applications.
-
I like a typical loop better because:
-It doesn't affect "this"
-It has an iterator (if you're wanting to look at item n+1 or n-1, very helpful) -
Tayo8975y@PrivateGER yes, but how many script kiddies will actually use WASM instead of doing the ez JavaScript which is "fast enough"
I mean, if it's slow, just add more servers right
Related Rants
-
Jantho19909Dear Microsoft, Please kill Internet Explorer post haste. The last time I want to hear "IE" is from the screa...
-
noobi0Got a mini project assignment in college. We decided to make a game using Unity that recgonizes sign language ...
-
nitnip4Saw a question on SO asking why foreach was slow with big data. The code provided was 6 nested foreachs (basi...
Keep it simple.
joke/meme
foreach