Похожие чаты

What blog? Can you share a link?

17 ответов

22 просмотра

https://plainenglish.io/blog/are-for-loops-better-than-arrays-filter-or-foreach-methods

Shayan- Автор вопроса
Mr Thieves
https://plainenglish.io/blog/are-for-loops-better-...

Your overall application may become faster by a really tiny fraction (definitely not noticeable to the end-user) when using for loops, but the trade-off is readability and maintainability of the code, at least in my opinion (it’s also mentioned on the blog). Anyway, as others have said, it doesn’t really matter in real world, so use whichever one you’re more comfortable with.

Mr Thieves
https://plainenglish.io/blog/are-for-loops-better-...

Would while, do_while loops stand a chance Someone also did a comparison for switch, if and object access In the end am sure you would only be confined to a minute feature set of javascript or any language for that matter

Richard | If you DM for support you PAY
Would while, do_while loops stand a chance Someo...

i don't care about performance since it's very very very very very small on small project with less than 100 data i want to handle.

A bundler would be well suited for this kind of optimisation, give some rope to those that would be maintaining the code

Mr Thieves
i don't care about performance since it's very ver...

For small data sets, you can actually cache on client side and do most of the calculations there. Appollo graphql already does this under the hood

Richard | If you DM for support you PAY
A bundler would be well suited for this kind of op...

There are sensible optimisations that humans can do that are hard for tools to do (today). Like using for loops over functions.

Thomas
They would stand a chance, yes

They are both slower than for loops

Thomas
They should be the same speed

If 'if' is faster than 'switch' am sure they are different, could write the benchmarking code but currently constrained of time

Похожие вопросы

Обсуждают сегодня

Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
70
Здравствуйте. Задача состоит в том, чтобы сделать real-time чат в мобильном приложении. После передачи сообщения пользователем через веб-сокеты, для основного и долговременног...
🐾
5
Всем доброго дня, ребят подскажите пожалуйста, если в курсе по ассемблеру используется MASM32, могу ли я использовать FASM? В чем явная разница и будет ли у меня все работать?
Botsman
17
Добрый день, не подскажите, если в OC-V3 поменять страндартную директорию /storage/ на /storage2/ - не будет сильно много проблем ?
Max Dubovsky
32
падает джоба хотя уже была собрана на соседнем namespace, куда капать? │ │ Copying blob sha256:2fa066caddb8f09a71082b03aa43046f79346a01d9c89e06a1f508bb1207dba5 427 │ │ Copyin...
Andrei St
0
Conversation at a festival with a non-crpto person (not a normie by any stretch, though): * person: tell me about crypto, me: ok, the original idea is p2p sound money for the...
molecular#123 🐓
25
Хотел бы спросить у знающих, правильную ли я выбрал книгу для начала изучения ассемблера Юрова В.И ? Или есть более лучшие книги для начала обучения?
Botsman
25
Книга Юрова В.И пойдёт для обучения?
Botsman
24
$params = [ 'formid' => 'feedbackForm', 'formTpl' => '@CODE: <form class="form-validate" data-id="ajax_form"> <fieldset class="margin-bottom-md"> ...
Pathologic
1
Люди добрые, помогите с идеями, потому что свои закончились. У клиента падает софтина в момент инициализации модуля OtlEventMonitor на RegisterWindowMessage('Gp/OtlTaskEvents/...
Михаил Усков
7
Карта сайта