procedural code, vs oopy code and performance

249 views Asked by At

I've written a backend app for use with a iOS App. When I started the project, I didnt know OOP at all.

Now half the scripts are classes and I am using a mvc pattern and classes. It sure is easier to reuse my methods now, but now there is alot more going on with each request.

For a backend system that handles pre fabricated (Predictable) requests, is it better "performance-wise" to use basic procedural scripts or use mvc and oop?

I ask as it seems as though much more happens when using mvc and oop.

1

There are 1 answers

0
David Harkness On BEST ANSWER

A hand-crafted solution written in assembly language for the target CPU by expert programmers will perform best in general, but cost 100 times more. Your solution, while it may perform a little less than a procedural program will be far more maintainable over time, allowing you to a) do something else and b) buy faster hardware. Since these are pre-fab queries, add a caching layer such as memcached.