Speed Comparisons - Procedural vs. OO in interpret

2019-04-18 15:38发布

In interpreted programming languages, such as PHP and JavaScript, what are the repercussions of going with an Object Oriented approach over a Procedural approach?

Specifically what I am looking for is a checklist of things to consider when creating a web application and choosing between Procedural and Object Oriented approaches, to optimize not only for speed, but maintainability as well. Cited research and test cases would be helpful as well if you know of any articles exploring this further.

Bottom line: how big (if any) is the performance hit really, when going with OO vs. Procedural in an interpreted language?

7条回答
疯言疯语
2楼-- · 2019-04-18 16:19

Your performance will be characterized by the implementation, not the language. You could use the slowest language and it could scale to be the biggest site in the world as long as you design it to scale.

Just remember the first rule of optimiztion.

Don't.

:)

查看更多
登录 后发表回答