10
I see many people spitting on Codeigniter, saying that it is a framework junk that refuses to follow the "language patterns". But I find it strange to say this of the framework that has the best performance among those that are not compiled as we can see in the benchmarks below
Benchmark of requests per second
Response time benchmark
Font: Dev-Media
I took this source consideration as it presents the versions of the tested frameworks and is one of the few that takes into account the Codeigniter 2.
Observing: Phalcon stands out so much from other frameworks by the fact that it is written in C, pre-compiled and used as server extension, which takes away virtually all the overhead that frameworks of interpreted languages usually have. Thank you @Kazzkiq
What makes Codeigniter perform so superior to others?
Who’s really wrong, Code Igniter for not following the "language patterns" or the patterns that are causing unnecessary overheads in other frameworks?
Note: It is important to remember that PHP was created to be procedural, having OO implemented in its version 5 and keeping the possibility of being written in procedural form, but using OO in php generates an overhead as can be seen in that reply
Place the source or link from which this data came
– rray
@rray added
– RodrigoBorth
The article is from Devmedia, but the benchmarks are from the Phalconphp framework documentation, that the title of curiosity, stands out so much of the other frameworks by the fact that it is written in C, pre-compiled and used as server extension, which takes out practically all overhead that frameworks of interpreted languages usually have.
– Kazzkiq
@Kazzkiq I left this information kind of implicit, but I will add to better exclaim the difference between them
– RodrigoBorth
@Rodrigoborth the other frameworks lose in performance but gain in maintenance and readability of code. Even better performance than codeigniter is possible if you don’t use any framework and make things to measure.
– gmsantos
Following standards doesn’t mean better computational performance. Standards are for other programmers to better understand your code (or for you to understand it yourself).
– Oeslei
@gmsantos yes, I know that, however, the code Igniter leaves nothing to be desired in code readability or in maintenance speed, in fact it has advantage in these two points also over other frameworks, that is what raises my doubt, if use OO prodrões, in a language originally procedural, is right or not?
– RodrigoBorth
@Oeslei in the case of PHP we have a difference between other languages because it is, in its essence a procedural language, and the patterns induced OO, which causes a great overhead in the language. Even so, Code Igniter that does not follow these standards can have a higher readability and easier and faster maintenance compared to other frameworks. Which begs the question, these patterns were thought in favor of php or were thought in favor of language being seen as equal to others?
– RodrigoBorth
@Rodrigoborth the focus of frameworks and the PHP language is not performance. This has been changing little since version 5.4 (the tests were based on version 5.3) by the pressure of frameworks like Phalcon, HHVM. One thing is certain: Codeginiter has stopped in time. Currently it is still in version 2.x, while the other FW have evolved with language. I would like to see this same Benchmark with the current versions of the Fws in question... possibly this difference would decrease dramatically.
– gmsantos
@gmsantos code Igniter is releasing its version 3.x, is still unstable, but who used said that the difference in performance for version 2 is quite large. I believe that this distance can increase even more in the next benchmarks. I still have no reference to the current benchmark, I believe that the 5.x version of php is the problem, as it is the transition version between procedural and OO
– RodrigoBorth
Although it doesn’t seem like it, there is a chasm between PHP versions 5.2, 5.3 and 5.4 (should reach a 4-year window in total). Another fact, Codeigniter is object-oriented.
– gmsantos
@gmsantos yes, I know he is OO, however, look at the way he uses OO and how other frameworks use OO’s the impression that are different paradigms being used
– RodrigoBorth
I found a second Benchmarking a little more recent. In it the Codeigniter loses to Kohana and Slim. In the same answer posted as reference note I found the phrase "Worrying about performance using PHP doesn’t make sense." and it really doesn’t. Worth reading: http://stackoverflow.com/a/16697154/2099835
– gmsantos
@gmsantos looked at the benchmark, I remember seeing a similar benchmark, with very similar results, but they were using CI version 1.7. In this I could not locate which version of the frameworks used
– RodrigoBorth
php quick? ops...there’s something wrong there, kkk
– Rod