House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Is ColdFusion slower than Java?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Shannon Rhodes
06/11/2012 01:43 PM

I'm giving feedback on a colleague's paper containing the following line: "Cold Fusion is written in JAVA which means, generally, that a ColdFusion program will run slower than a program written directly in JAVA.....  If speed of the application were the primary consideration, PHP or JAVA is the clear choice." Now maybe I'm just used to hearing ColdFusion marketed as leveraging Java's speed; I suppose it makes sense that any extra layer is going to cost something in performance.  A measurable difference, though?  And since CF compiles to Java, and native Java would have to be compiled, isn't it possible that running CF is effectively identical to running Java? I can't find any proof of this assertion one way or the other.  Does anyone know the answer? Thanks!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Cameron Childress
06/11/2012 02:03 PM

On Mon, Jun 11, 2012 at 1:42 PM, Shannon Rhodes <Shannon@rhodesedge.com>wrote: > > I'm giving feedback on a colleague's paper containing the following line: > > "Cold Fusion is written in JAVA which means, generally, that a ColdFusion > program will run slower than a program written directly in JAVA.....  If > speed of the application were the primary consideration, PHP or JAVA is the > clear choice." This is flawed logic, since it would make the following statement also true: "Java and PHP are slower than assembly. If the speed of the application were the primary consideration, Assembly is the clear choice." -Cameron ...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
DURETTE, STEVEN J
06/11/2012 02:13 PM

My understanding is that ColdFusion is compiled down to Java byte code. It can be done in advance or on the fly. Therefore, byte code is byte code, after it is compiled it will run at the same speed as Java because it is compiled Java at that point. As I understand it PHP is interpreted each time it is run (I could be totally off on that my last time dealing with php was years ago), so it shouldn't even be considered if you are comparing ColdFusion to Java. However, ColdFusion can be compiled either on the fly or before use, so I would think that means ColdFusion is the best of both worlds between Java and PHP. Of course this is all my own opinion and limited knowledge. Ok, I guess I'm ready for flames and insults if I'm wrong. Steve On Mon, Jun 11, 2012 at 1:42 PM, Shannon Rhodes <Shannon@rhodesedge.com>wrote: > > I'm giving feedback on a colleague's paper containing the following line: > > "Cold Fusion is written in JAVA which means, generally, that a ColdFusion > program will run slower than a program written directly in JAVA.....  If > speed of the application were the primary consideration, PHP or JAVA is the > clear choice." This is flawed logic, since it would make the following statement also true: "Java and PHP are slower than assembly. If the speed of the application were the primary consideration, Assembly is the clear choice." -Cameron ...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
06/11/2012 05:49 PM

>>Cold Fusion is written in JAVA which means, generally, that a ColdFusion program will run slower than a program written directly in JAVA. Yet another statement from a guy who doesn't know what he is talking about. Java programs AND CF templates are compiled into Java byte code. CF templates are recompiled only if they have been modified. CF might be longer or even faster to compile than Java, but when they are compiled, they both are just Java byte code and should execute as fast. The only reson CF could be slower would be if the compiler generates less efficient code, and this is yet to be proven. One thing is certain however, a CF application is many times faster to develop than Java!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Mandel
06/11/2012 07:29 PM

Okay guys - there is a lot of misinformation going on here. To clear up a few things: In a pure apples to apples comparison, yes, Java will most likely be faster. For example, if you do a Fibonacci sequence generator in Java, it will most likely be faster in Java than CF. Reason being that ColdFusion is a dynamic language, whereas Java is static. So ColdFusion has to write a lot more byte code than straight Java will need to.  This will be true for any dynamic language that is compiled to bytecode on the JVM, simply because it needs to manage the dynamic nature of the variables and methods that pass through it. So the statement of "they are compiled down to bytecode, so they are just as fast" is actually incorrect. It's a question of what the bytecode is doing and how much bytecode is the million dollar question. Now - the statement of "Cold Fusion is written in JAVA which means, generally, that a ColdFusion program will run slower than a program written directly in JAVA.....  If speed of the application were the primary consideration, PHP or JAVA is the clear choice.". I say that this is incorrect as well, for a few reasons: 1) As people said, if speed is a primary consideration, write in Assembly. 2) The programming language is 99% time never the bottleneck in the an application. It's usually aspects such as the database.  If speed of the application is the primary concern, I'd be far more interested in horizontal scalability. 3) I'm not sure where they get the stats that PHP is faster than anything else? That seems like a weird statement. I'd be curious about the numbers to back it up. Hopefully that clears things up. Mark On Tue, Jun 12, 2012 at 7:49 AM, <> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Shannon Rhodes
06/12/2012 11:21 AM

Thanks for the great analysis! He took out the speed issue comment.


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 20, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference