Похожие чаты

What blog? Can you share a link?

17 ответов

21 просмотр

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

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

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

For managing user-generated content rights in gaming? 🤯🚀
Brian
37
Do we have a Chinese community here?
迪迦
20
@Aiwan что такое база образца?
Alexey
27
Не многие знают, а кто знает, тот уже успел забыть, что в далёком 2004 году эта игра произвела настоящий фурор, настолько революционной была технология, применяемая для её соз...
ICCID
4
Why binance delisting the token?
🅰🅽🅳🆁🅴🆆
14
Hi is Atomic wallet safe to exchange btc to xmr?
Regex
20
Короче я тут узнал полный пиздец Что кучу постов которые я создавал через posted Спустя время не могу редактировать и менять Мол телега возвращае ошибку Это реально так ...
inc.
13
коллеги, добрый вечер! А никто не знает как модальная форма может себя закрыть? Ну допустим модальная форма определила, что смысла ей работать нет и хочет вернуть modalResult...
Михаил
83
Hello, Ergo Investor here. Had a few questions for the leadership of the project, from what I’ve seen @kushti_ru , @Armeanio @dadreboi In one sentence, what is your vision f...
A
13
Is UniBright Freequity an active live product ? A friend here in Asia was discussing the Tokenisation of RWA’s in his case Real Estate as he’s a developer with numerous overs...
Digital Trust
5
Карта сайта