Answer the question
In order to leave comments, you need to log in
Passing and returning parameters to functions - how much does it affect performance?
Has anyone done tests or read articles about this? Whether it greatly slows down the processing of a large amount of data when passing strings to other functions and returning them back. For example, not just 1 gear, but 2, 3, 4? I never even thought about it before, but when it comes to billions of records, and still I want to have a normal program structure that can be used flexibly, if it's pasta))
Answer the question
In order to leave comments, you need to log in
In java, everything except primitives is passed by reference. You save on matches.
It influences, but not directly, but due to the fact that there will be more classes, and each class will "weigh" more the more functions it has, so do not take it to extremes, any architectural separation should be explained by practical tasks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question