Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using design patterns makes java code slow? [closed]

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?

like image 948
Pavel Avatar asked Oct 06 '12 12:10

Pavel


1 Answers

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.

like image 91
Simulant Avatar answered Sep 21 '22 04:09

Simulant