apulmca Posted July 15, 2010 Share Posted July 15, 2010 Hi, I would like to know the reasons why PHP is faster than any other language? Please suggest. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/ Share on other sites More sharing options...
PugJr Posted July 15, 2010 Share Posted July 15, 2010 I'd think PHP is faster than some languages (Although I can't name you any.). Others it isn't as fast. Mostly though, the speed of code depends on the programmer. PHP is not meant for speed of processing, but speed of how fast you can code. My observations atleast. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086260 Share on other sites More sharing options...
trq Posted July 15, 2010 Share Posted July 15, 2010 Hi, I would like to know the reasons why PHP is faster than any other language? Please suggest. Its not. Some, maybe... any, nope. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086266 Share on other sites More sharing options...
apulmca Posted July 15, 2010 Author Share Posted July 15, 2010 But, Some benchmark has proved that PHP is faster than Ruby, ASP, java languages. I want to know the reason. Why is so? Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086284 Share on other sites More sharing options...
Mchl Posted July 15, 2010 Share Posted July 15, 2010 Because it was poor benchmark? Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086285 Share on other sites More sharing options...
trq Posted July 15, 2010 Share Posted July 15, 2010 But, Some benchmark has proved that PHP is faster than Ruby, ASP, java languages. I want to know the reason. Why is so? Take a look at the documentation supplied with some benchmark. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086288 Share on other sites More sharing options...
Daniel0 Posted July 15, 2010 Share Posted July 15, 2010 But, Some benchmark has proved that PHP is faster than Ruby, ASP, java languages. I want to know the reason. Why is so? I bet I can pick any of those four, and, given enough time to research, make it come out as fastest in a benchmark. Benchmarks are mostly bullshit, and even more so when you try to compare languages. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1086366 Share on other sites More sharing options...
j.smith1981 Posted July 22, 2010 Share Posted July 22, 2010 But, Some benchmark has proved that PHP is faster than Ruby, ASP, java languages. I want to know the reason. Why is so? I bet I can pick any of those four, and, given enough time to research, make it come out as fastest in a benchmark. Benchmarks are mostly bullshit, and even more so when you try to compare languages. I have to 100% agree with that comment, very well said! Usually you go for a language because of what it can do, or the benefits of using that ie Java is quite a slow language when executing, but then have the understanding that any of the source you write will be compile worthy on any other operating system platform (as long as they have the same Java version ie if your using 1.6 and their using 1.5, then there could be a problem if any of the things you used in your application dont exist in Java v5). Just thought I would share my view. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1089597 Share on other sites More sharing options...
JonnoTheDev Posted July 22, 2010 Share Posted July 22, 2010 why PHP is faster than any other language It comes from Jamacia Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1089658 Share on other sites More sharing options...
j.smith1981 Posted July 22, 2010 Share Posted July 22, 2010 why PHP is faster than any other language It comes from Jamacia You'll find it actually originated in Greenland by Ramus Lerdorf originally though of course, all because he wanted to track users to his site then a few other developers took it further and developed it into what now call version 5. I think PHP is just wonderful personally, you can kick off with simple scripts and get onto the more challenging aspects of web development with it. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1089834 Share on other sites More sharing options...
j.smith1981 Posted July 22, 2010 Share Posted July 22, 2010 Not that I am at all being biased towards PHP or any other language myself, I like to see programming languages for what they really are, if C# is good for something then I will use that, if some other language is good for another purpose then I'll use that. Ultimately the faster languages go further down into machine code eventually like 0's and 1's (or binary where they need no compiling at all). Assembly was I think (dont quote me on this as I dont have a reference to hand here), but I believe C (from various unconfirmed sources so please feel free to oppose my view here if you feel the need to), but C was developed from Assembly. Like Assembly just to write a hello world application we all know and love (to start off with anyways), takes about 7-10 lines of instruction code, one of them being how long that string is going to be, you must then save that in memory before making the string, its like the backbone of what C compilers do for you, in theory anyways. Thats how languages work in computer programming, just C in itself (which is what PHP was developed from), has been optimised a whole lot to make it rather an efficient language both in use and speed. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1089842 Share on other sites More sharing options...
Alex Posted July 22, 2010 Share Posted July 22, 2010 why PHP is faster than any other language It comes from Jamacia You'll find it actually originated in Greenland by Ramus Lerdorf originally though of course, all because he wanted to track users to his site then a few other developers took it further and developed it into what now call version 5. He was making a joke I think PHP is just wonderful personally, you can kick off with simple scripts and get onto the more challenging aspects of web development with it. Yeah, that's one of the main reasons people pick PHP, it has a low learning curve. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1089845 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 Actually in terms of speed ASP.NET beats PHP in mostly everything. Im not sure where you got these benchmarks from but their quite obviously wrong. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090057 Share on other sites More sharing options...
Daniel0 Posted July 23, 2010 Share Posted July 23, 2010 Actually in terms of speed ASP.NET beats PHP in mostly everything. Im not sure where you got these benchmarks from but their quite obviously wrong. Who wrote the code? A master at ASP.NET and average at PHP? What kind of opcode cache did they use for PHP? Did they use any at all? How did they configure PHP? How did they configure ASP.NET? How did they make sure that their benchmarks were representative of each language's strong point (e.g. ASP.NET may be faster at doing X, but PHP may be faster at doing Y)? Which platform did they run it on? What compiler flags did they use? The list goes on and on and on. There are too many factors to make any meaningful conclusion about their relative speed. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090061 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 thats true, there are many different factors to take into account, its obvious that an ASP.NET master could right faster code than a PHP novice, and visa versa, but in general from the tests i've seen ASP.NET seems to be quite a lot faster. http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/ is one. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090064 Share on other sites More sharing options...
j.smith1981 Posted July 23, 2010 Share Posted July 23, 2010 Actually in terms of speed ASP.NET beats PHP in mostly everything. Im not sure where you got these benchmarks from but their quite obviously wrong. Who wrote the code? A master at ASP.NET and average at PHP? What kind of opcode cache did they use for PHP? Did they use any at all? How did they configure PHP? How did they configure ASP.NET? How did they make sure that their benchmarks were representative of each language's strong point (e.g. ASP.NET may be faster at doing X, but PHP may be faster at doing Y)? Which platform did they run it on? What compiler flags did they use? The list goes on and on and on. There are too many factors to make any meaningful conclusion about their relative speed. Thats a very valid point that, I mean I do apologise about what I said about it coming from jamaica lol, was tired brain not functioning properly. Not to drift off topic here at all, but to make that kind of judgement would be really unfair, I mean generally Microsoft love to over load things, make things far more complex than they need to be, like have 10s of thousands of libraries (I know I am probably exadurating this, excuse spelling if you will), with direct X anyways, I mean its way over blown compared to what it needs to be, OpenGL is allot better controlled I think myself. Although I havent done allot but event that on button click whatever event handler it is, why have all that rubbish overblown in there? Microsoft just go with the old and put things over it to save money in developing things, ie Vista's kernel for the operating system itself (ie if you've ever used Linux before you'll understand the operating system doesnt include notepad, thats just a software they bundle with it), to run notepad you need a kernel to load that application, the bit of software that talks to the hardware. That was identical to XP, they just changed the face of it and probably added a few (with comparison to Linux with this) added modules to allow you to do more, where as windows 7 was a complete change I believe in the kernel, they dont let you know this because they are so user friendly, why I refuse to like Microsoft but then I am forced to due to the majority of my work being based on Windows. Ask yourself this, why in polls of the web servers live today does Linux Apache outwit IIS? Because its faster! I mean there are comparisons to this though Apache is quite slow at delivering media content, but there are tips on the web somewhere or lying around in some archive to optimise this issue, so that doesnt occur, I dont know about this myself only been told this from friends advice at work. Just goes to show how powerful Linux servers really are, literally once when Linux was first out, a company was developing some advanced calculation software based on the operating system, they left it continually running for 2 years, most of the time not doing anything at all came back on x day and it had the same performance asif it had just been installed right there and then in the same hour, its crazy that! I doubt everything Microsoft claims personally prefer to stick to the open source stuff (why I love PHP). God I need to stop waffling lol. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090069 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 not sure but isn't the 7 kernel the same as the vista kernel? Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090071 Share on other sites More sharing options...
JonnoTheDev Posted July 23, 2010 Share Posted July 23, 2010 its obvious that an ASP.NET master could right faster code than a PHP novice And use a spell / grammar check Thats a very valid point that, I mean I do apologise about what I said about it coming from jamaica lol, was tired brain not functioning properly. There's always one, eh. Never mind. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090082 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 its obvious that an ASP.NET master could right faster code than a PHP novice And use a spell / grammar check wow i wrote that? woops, sorry :/ Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090084 Share on other sites More sharing options...
JonnoTheDev Posted July 23, 2010 Share Posted July 23, 2010 its obvious that an ASP.NET master could right faster code than a PHP novice And use a spell / grammar check wow i wrote that? woops, sorry :/ LOL, you also wrote Im not sure where you got these benchmarks from but their quite obviously wrong. Sorry for nitpicking Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090088 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 heh, happens when im typing too fast. Im usually ok tho o.o Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090089 Share on other sites More sharing options...
Daniel0 Posted July 23, 2010 Share Posted July 23, 2010 heh, happens when im typing too fast. Im usually ok tho o.o Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090100 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090101 Share on other sites More sharing options...
j.smith1981 Posted July 23, 2010 Share Posted July 23, 2010 not sure but isn't the 7 kernel the same as the vista kernel? No their not, they do the same thing in principle but their coded entirely in 2 different ways. X Windows Server is what makes the GUI possible, Graphical User Interface, I like to think of Linux as say like windows 3.1 but with an operational part behind the graphics interface called the server that talks to the commandline and issues commands to the shell. The shell is the Linux equivalent to the commandline in Windows (there's more than just one of them too, the common one is BASH Bourne Again Shell is what that stands for, cant remember his full name the guy that developed it but his surname was Bourne he gave up with it and then came back to it years later and finished it off), KORN is another cant remember the others they have their differences for different things. I love Linux myself, just restrained to Windows due to work, commercialisation etc (god its annoying!), why I have both on my working computer and Linux on my lite home made server out of a Linux machine, using the howtoforge tutorials. Its fun working in Linux! Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090196 Share on other sites More sharing options...
Tazerenix Posted July 23, 2010 Share Posted July 23, 2010 yea linux is good , I just use windows more because I don't have constant internet access on my laptop with ubuntu. Quote Link to comment https://forums.phpfreaks.com/topic/207790-why-php-is-faster-than-any-other-language/#findComment-1090446 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.