>run code on C that does "thing"
>0.00136 seconds later, it returns the result.
>run code on Java that does the same "thing"
>2 seconds later, it returns the result.
Javatards will defend this.
>>51410586
the java solution is more portable
>>51410586
Now do the timing inside the program. Startup of the JVM costs a fixed amount of time, but the program itself won't be more than 20% slower.
>>51410586
>Bothering about Java
>>51410964
>bothering with the most used computer language of all time
>>51411008
popular != good
>write code on C that does "thing"
>300 lines later, the program is done
>write code on Java that does "thing"
>50 lines later, the program is done
Non-systems-programming programmers will defend this.
>>51410586
And what is this "thing"? A full, working application that solves a real-world problem?
Or some shitty one-line hello world?
>>51410674
good meme
>>51411032
Literally a conditional.
>>51411025
What is this even supposed to mean, retard? No one is pointing a gun at millions of coders to make their programs in Java. Java is the most popular because its the most powerful language.
>>51411027try
{
//Protected code
}catch(ExceptionName e1)
{
//Catch block
}
>>51411061
You've just proved my point. Which is you take literally two lines of code in C and Java and think you've made a worthwhile comparison.
Why not compare actual, functioning applications?
>write a code in C that does "thing"
>takes 1 second
>write a code in C++ that does "thing"
>takes 0 second, done at compile time
>>51411116
>muh templates
>>51411106
If Java takes 2 seconds to make a simple conditional, it will snowball for a full program.
>>51411098
>>51411098try {
//Protected code
} catch(ExceptionName e1) {
//Catch block
}
ftfy
>>51411144
Nice tripdubs, but you're retarded and you don't know what you're talking about.
>>51411144
You haven't actually profiled two implementations of the same non-trivial system.
Clojure, gg.
>>51411027
http://benchmarksgame.alioth.debian.org/u64q/java.html
Total of gziped code sizes (which is only a fair comparison if you're using an IDE with autocomplete, if not then C wins):
Java: 14307
C: 14422
Practically identical
But total time taken:
Java: 84.99
C: 50.17
Great victory for C, Java is 69% slower.
>>51410674
>more portable
>than c
hahahahahahahahahaha
>>51411098
>ExceptionName e1
>implying that you're going to have any more than 1 e in scope
>C
>program code on linux
>it includes libcurl
>try to compile for windows
>fail horribly
fucking hell
>>51411340
Write once, run everywhere you pleb
>Java
>SIMD
Choose one
>Java
>Efficient memory management
Choose one
>Java
>Horrible build tools from Satan himself
Choose two
>Java
>Runs without installing JRE
Choose one
C for embedded and OS level programs.
Java for servers and clusters.
Why choose?
>using Boilerplate: The Language
>>51411431
you forgot the fine print for everywhere*
*for some values of everywhere
>>51410586
cool, now run it in Python
>>51411091
>most powerful language
>Java
>>51410586
>write code in Java
>get a job
>write code in C
>complain on 4chan
>>51411894
>>Writing on an OS probably written in C
>> Written by people with actual jobs
Shitty b8. 0/10
>>51411403
>>Microsoft Windows
>>Visual Studio
>>51410586
Compile it and run it on a machine you've never seen before.
Good luck.
>>51410586
>code badly in java
>blame the language
>>51411025
>popular != good
>popular !== good
Fixed
>>51410586
What did you expect? Java is interpreted, it can't even be put in the same category as C.
>>51411431
except non-java platforms.
IE, embedded systems. You know, the things that real programmers work with to make lots of money.
Nobody wants Java on an ATM or security system.
>>51412171
Well, java won't run on an AVR chip, so I guess that's that.
>>51412527
>>51412748
Jet fuel can't melt steel bait
>>51410916
This.
>>51410674
Ideally this too, but it took a hacked version of .net called mono.
If OP wanted a real comparison, he should have used python or php. C does shit in 50ns that php will do in 50ms, yes 1000 times slower. You try making a graph of that. Meanwhile, php devs are currently jizzing over the fact that php 7 is three times faster... And still hundreds of times slower than most other languages.
>>51412585
>Nobody wants Java on a[...] security system.
Is that why smartcards run Java?
okay let us see the code, I'm 100% sure you coded badly you fucking nigger