[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>run code on C that does "thing" >0.00136 seconds

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 46
Thread images: 9

File: hqdefault.jpg (32KB, 480x360px) Image search: [Google]
hqdefault.jpg
32KB, 480x360px
>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.
>>
File: beels :DDDDDD.jpg (32KB, 528x404px) Image search: [Google]
beels :DDDDDD.jpg
32KB, 528x404px
>>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.
>>
File: 1403033649685.png (249KB, 406x403px) Image search: [Google]
1403033649685.png
249KB, 406x403px
>>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.
>>
>>51411027
try
{
//Protected code
}catch(ExceptionName e1)
{
//Catch block
}
>>
File: beels :DDDDDD.png (23KB, 528x404px) Image search: [Google]
beels :DDDDDD.png
23KB, 528x404px
>>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.
>>
File: exceptions.jpg (82KB, 680x680px) Image search: [Google]
exceptions.jpg
82KB, 680x680px
>>51411098
>>
>>51411098
try {
//Protected code
} catch(ExceptionName e1) {
//Catch block
}

ftfy
>>
File: bobod xDDDDDDDD.jpg (56KB, 749x442px) Image search: [Google]
bobod xDDDDDDDD.jpg
56KB, 749x442px
>>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
>>
File: 6dc.jpg (38KB, 640x428px) Image search: [Google]
6dc.jpg
38KB, 640x428px
>>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.
>>
File: Bait in 3d.jpg (100KB, 450x664px) Image search: [Google]
Bait in 3d.jpg
100KB, 450x664px
>>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
Thread posts: 46
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.