Algorithms, solution methods, comparison of their performance - page 8

 
Alexandr Andreev:

I would like to point out that, unlike everyone else here, Peter probably has the greatest patience - and a willingness to write monotonous code. I can't explain otherwise how he managed to write so many things


Is this tendency towards monotonous code an "Indian" style?
Or what do you mean by that?

)

 

I just have one question, why not use an int array or better yet, use a listing if you have enough of these wizards ?
Why use a string to do this ? so you can enter letters as well ? or even better, you can count in the 16 bit system ! or even cooler, go straight to 128 bit...

 
Mikhail Dovbakh:

Is the penchant for monotone code an "Indian" style?
Or what did you mean by that?

)


Bingo!!! didn't want to say it myself

 
Mikhail Dovbakh:

Is the tendency towards monotonous code an "Indian" style?
Or what did you mean by that?

)


Russian style with the endless urge to rewrite everything is not particularly ace either - especially in large projects

 
Alexandr Andreev:

There are only two variants of string either it has maximal size (in reserve), or memory is allocated and in your case during addition process it is allocated every time.... So, it is the same as changing the size of an int array. 1in1 well maybe int is allocating memory for 10% longer than string is allocating memory for 1 character, if you compare more characters then i guess int wins

It would be interesting to check your statement in practice. If constant resizing of int array with rewriting data back and forth is as fast as working with string, I'd certainly prefer int.

But I highly doubt the speed will be the same. Intuition.

 
Реter Konow:

It would be interesting to check your assertion in practice. If constant resizing of int array with rewriting data back and forth will be as fast as working with string, I'll certainly prefer int.


well check - the code there is simple.... I also advise to loop the code 100 000 times, so it will be more clear and less dependent on extraneous factors.

I thought this topic was originally intended for such comparisons.

 
Alexandr Andreev:

I would like to point out that, unlike everyone else here, Peter probably has the greatest patience - and a willingness to write monotonous code. Otherwise I cannot explain how he managed to write so much

That's a bold statement, do you have something to back it up?
 
I ask the participants of the discussion not to turn to personalities. Thank you.
 
Alexandr Andreev:

Bingo!!! didn't mean to say it myself


Againfxsaber is right- invisibility of posts and topics of characters from his "Black List" for every user on this forum is already a necessity. to maintain a healthy society. And the individual...
Otherwise as a mockery of the profession this thread is not perceived.
(

 
Yury Kulikov:
That's a bold statement, can you back it up with something?

OK, Peter develops GUIs - in writing GUIs OOP helps us to simplify and simplify code more than anywhere else. But we write without it - and here we can't call this method fast, but persistence takes its toll and we can see some GUI) .... Of course, I'm not comparing those people who have 30 hard OOP lines each with defunct macros of classes like #define micrcalss(CALSS, PARENTS) class CLASS : public PARENTS ......

Reason: