complex at the machine level ?
???
It will always depend of the type of the object that you create and their constructors E.g.: when you declare an Integer , it is almost always O(1) (always cost the same) But when you use other objects, their complexity may change and is bigger, for example O(N) (it depends of the size of the object) Also, you have to evaluate if there is any arithmetic operations, like sums, products, fractions, etc This is because products and divisions take more cycles to be completed by the processor. Also, storing a lot of variables or using so so much constructors inside one is "complex" for the computer, not because more time is needed but more instructions for doing two simple lines Hope it helps 😄
Обсуждают сегодня