Does using design patterns makes java code slow? If I use extra interfaces and syntax constructions (like class wrap) will I get well organized but slow code or that won’t make my code significantly slower?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This will not make your code significantly slower. As some function calls are wrapped in additional classes or methodes, some method-calls are a little bit slower, but a human will not notice this. It’s about nano-seconds. Allways prefere the advantage of good readable and reusable code.
I a high performance application, you should consider to refactor your code to a higher performance after designing and implementing it based on patterns. But normaly this is not needed.
And as always: It depends on the used pattern and the usecase of your program.