Похожие чаты

I want to be able to use a mathematical approach

to determine the costs of operations I perform code-wise. Is Learning the Asymptotic Notation enough?

9 ответов

10 просмотров

Asymptotic notation usually deals with number of operations, not the time each operation takes.

🖖- Автор вопроса
🖖
...so what do you recommend?

What do you want exactly? To know how much operation like "+" or "*" take on your CPU?

🖖- Автор вопроса
Ihor
What do you want exactly? To know how much operati...

To be able to mathematically analyze designs I come up with, which will enable to make comparisons before implementation

🖖- Автор вопроса
🖖
To be able to mathematically analyze designs I com...

...so I can be sure I meet requirements

🖖
To be able to mathematically analyze designs I com...

For general analysis O notation may be fine. But the whole point of the notation is to ignore time for each operation and the exact number of operations in algorithms. It's more high level than this.

🖖- Автор вопроса
Ihor
For general analysis O notation may be fine. But t...

I think I get your point. Ultimately, the time is machine and/or OS dependent. I think big-O and some research will do the job then

🖖
I think I get your point. Ultimately, the time is ...

The only real way to know is to benchmark on realistic inputs. Other factors affect overall time too like memory access. Big O notation doesn't take it into consideration. And it ignores constant factors because it assumes that N approaches infinity. In reality N and 2N make huge difference while both are O(N)

🖖- Автор вопроса
Ihor
The only real way to know is to benchmark on reali...

I'll come back to this when I can relate

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

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

Вопрос по диагностике ошибок (я знаю в чем, в данном конкретном примере, я знаю, как исправить, пример модельный, понятно, что в реальности бывает намного запутаннее). module...
ⰄⰎⰋⰐⰐⰑⰛⰤⰧⰧⰩⰄ ⰊⰑⰁⰓⰡⰛⰦⰕⰫ
10
Тут кста кто-нибудь NeoVim использует?
Simple Sorcerer
13
А чем вам питонисты не угодили?😂
.
79
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
52
New Hedera drama. Is Hashinals on chain or not on chain?
Perfect Ability
16
Can someone explain me the difference of the stated quote on Quants homepage between R3 and Quant? „R3 brings its ability to deliver complex pioneering projects for regulate...
Carlson
2
Asus, норм фирма для ноутов?
Артем Записной
20
guys, why is it taking days for my node to sync? is this normal?
Big Chiano
10
А дальше что?.. Записать в файл, потом в Код?.. И потом разбирать как-то?..
Хаскель Моисеевич Гопник
14
Ребят немного глупый вопрос, но я правильно понимаю что неполнота по геделю означает наличие парадокса?
Smith
9
Карта сайта