How to avoid the dangers of optimization when designing for the unknown?

Two partners:

1) Let's say you are developing a new type of application, and you are in the process of developing new algorithms for expressing concepts and content - does it make sense to actively try Do not consider optimization methods at this stage, even if deep down you are afraid that it might end as O (N!) Over millions of elements?

2) If so, tell me, so as not to limit the cool functionality that you might be able to optimize after the proof of concept is launched - how do you stop yourself from this habit of programmers lifespan? I tried mental exercises, paper notes, but I grew, essentially, counting clock cycles in assembler, and I constantly find myself vetoing potential solutions to be too wasteful before fully taking into account the functional value.

Edit: It's about designing something that wasn't (unknown) before, when you're not even sure if it can be done in theory, it doesn't matter, with unlimited processing power at hand. Thus, the answers on the line “of course you must optimize before you have a prototype because it is an established computational principle” are not particularly useful.

+3
source share
14 answers

I say all of the following not because I think that you still do not know this, but to provide moral support while you suppress your inner critic :-)

The key is to keep sanity.

, Theta (N!), , , , . , , .

, Pentium, , 10 10K , . 95%. . , , .

, " , " " ". , , .

( , ), -, N <= 7, Cincinnati. -, , . , , , .

, , ( , ) ( - , ). , - , , .

+6
+5

- ; , , - . , - .

, , - , , , , . , , , "" - .

" - " - . , . , . ( ), , , .

, ; memcpys, , , TS ( TS ) . 40 , , , VOD, .

+2

, - , . , .

+2

: " , , 97% : - ". O (N!) O (poly (N)) " "!

1 - , (O (N!) , !) , , , .

+2

" , ".

" , ".

, .

+2

, ( ).

O (N!) , , ! 99% .

- . . , 6 , , , . , , /. , , .

, , , , .

+2

" " . 80/20 . 80% 20% , , 20% .

, , . . . , , , .

+1

, O (N!) . , . , - , 10 20 !

- , :-) . - . , , , , (, C/++) , , , python . .

, , , , , , . - , .

+1

onebyone , .

, . , , , .

/ .. , , . , , , , .; -)

+1

, , .

, MIT AI Lab, , , , , , ..

, , , , - , - . , , , , .

, . - , .

, , . , , , , , , , . .

, , .

, - , , , . (: .)

, , .

+1

, , , :

1000
10000
100000
1000000

, . , .

0

, , .

, () . , , , .

. - ( ) - . dev- .

, . ? , , .

, .

0

. ( )

, - -.

. . , : 15 .

, - , : -, - 15 , , .

: . , . (, 10 ), , agian: .

, : ( )

Demos to fomr laptop customers is ALWAYS a scenario. We must sell the product.

Maintenance when someone updates this thing is ALWAYS a script.

So now, as an example: all hard, AI heavy, lisp-leaf approaches are not suitable. Or for different strokes, the XML server configuration file is not user friendly enough.

See how it helps.

0
source

Source: https://habr.com/ru/post/1697304/


All Articles