[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]

Is there some rating of language complexity/perfomance?

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: 65
Thread images: 10

File: image.jpg (55KB, 540x392px) Image search: [Google]
image.jpg
55KB, 540x392px
Is there some rating of language complexity/perfomance?
>>
File: quora.png (19KB, 613x222px) Image search: [Google]
quora.png
19KB, 613x222px
>>
>>57071126

>ths_triggers_the_gtard.jpg
>>
File: ThatsUnusual.png (10KB, 259x100px) Image search: [Google]
ThatsUnusual.png
10KB, 259x100px
>>57071126
>>
>>57070897
Depends on the task. C is usually the fastest and best performing, while java, python and ruby are slower.
>>
>>57070897
no, you cannot objectively rate something like complexity. As for performance well...very prone to nitpicking and comparing apples and oranges, but it can be done.
>>
The most complex: C++
The most simple: Forth
The fastestest: C
The slowest: ... I've heard MATLAB is slow af but it's special-purpose
>>
>>57071948
Has C catched up with fortran in speed?
>>
>>57072566
>catched
>>
>>57072600
I guess you never make mistakes when you are using a second language, do you?
>>
>>57070897
Used Fortran at uni for physics. That's about the only application it has though. It's horrid.
>>
>>57072654
It's a meme you dip
>>
>>57071659
>you cannot objectively rate something like complexity
What if it were layers of abstraction?
>>
File: 1473824026969.jpg (38KB, 472x531px) Image search: [Google]
1473824026969.jpg
38KB, 472x531px
>>57071126
>>
>>57072752
what constitutes 1 layer of abstraction?
you can't answer this objectively, at the end of the day it's up to your judgement.
>>
In terms of performance, Assembly is the best but C(++) is really close second. Generally low-level programming languages have better performance than high-level since they give you more control. It does have the unfortunate side effect of being able to produce code with worse performance if you don't know what you're doing.
>>
File: 1468990191236.png (152KB, 300x349px) Image search: [Google]
1468990191236.png
152KB, 300x349px
>Be me
> Make algorithms in c
> implement them in python
>>
>>57073282
What makes you to do so?
>>
>>57072566
You're joking, right? C was always the fastest after assembler.
>>
>>57074964
No
There was time when C didn't exist
>>
Fortran still superfast to do heavy math in physics and engineering, even if the code is crap.

It simply cannot be challenged for fast developing and calculations speed when you want to crunch numbers.
>>
>>57075092
Science and engineering is for fags. Bet they don't even have riced loli desktops.
>>
>>57072654
>English
>second language
third world detected
>>
>>57075092
I suppose it is pretty fast... for a language that isn't C.
>>
>>57075362
The point to understand here is not to over complicate life.

Why bother with when we can do parallel processing with little effort in Fortran.
>>
>>57075472
The point here to understand is you're not a real programmer if you use anything that isn't C.
>>
Doesn't GCC use F2C for compiling Fortran? Also I thought Fortran was still faster than C, it's not?
>>
>>57075529
Fortran was never actually faster than C, but doing parallel computations was a little easier before OMP was invented.
>>
>>57075509
C is an easy way
Real programmers use assembly
>>
>>57075556
I have a hard time believing C was faster than Fortran right off the bat when Fortran had like a 20 year head start of optimization and shit
>>
>>57070897
most simple: JS
most complex: JS
soon to be the fastest: JS
>>
>>57075593
>js
>faster than a statically typed, ahead-of-time compiled language
>>
File: ok.gif (236KB, 500x500px) Image search: [Google]
ok.gif
236KB, 500x500px
>>57075509
Maybe help me see the beauty of C for numerical operations with arrays?
>>
>>57075509
Nice meme
>>
>>57075621
Soon
Soon it will compile the types
>>
>>57075741
you need explicit types in source code for performance.
>>
>>57075300
Most muricans don't even have a first language
>>
>>57075556
stop baiting, C used to be hella slow compared to FORTRAN when it first came about
>>
File: 1467092102854.jpgXX0001.jpg (349KB, 1280x1080px) Image search: [Google]
1467092102854.jpgXX0001.jpg
349KB, 1280x1080px
>>57070897
For complexity, the usual things are:
Object oriented, class support.
Inheritance
Polymorphism
Garbage collection

You can be strongly typed (C, C++, Java) or weakly typed (Python, bash)

Performance can be measured with tests, but in general compiled programs run faster than interpreted ones. Minecraft is written in java but the textures and models are very simple, while really taxing programs like Fallout 4 and friends are usually C/C++
>>
>>57070897
>language performance

That's not really a specification of the language so much as it is the quality of the compiler.
>>
>>57078505
>Minecraft is written in java but the textures and models are very simple, while really taxing programs like Fallout 4 and friends are usually C/C++

I'm pretty sure it's the number crunching (like physics, AI, collision, etc...) that's the bottleneck, not loading models and textures. Even if there's some slight overhead on creating objects representing models and textures in memory in Java, once it's loaded into VRAM that's irrelevant, unless it's a game that does a lot of texture streaming.
>>
>>57078505
>strongly typed
>C, C++, Java

I'd call those languages "statically typed", but strong typing means you can't get away with doing
std::string a;
return ((int) a);
>>
File: recent.jpg (379KB, 1280x1080px) Image search: [Google]
recent.jpg
379KB, 1280x1080px
>>57078570
The size of the games helps here. What is the size of Fallout 4? What is the size of Minecraft?
I run a few minecraft servers, the worlds are less than a gig. The client, Minecraft.jar, is 276K
Modern games are tens of gigs, with textures, models, animations, as well as physics solvers, path finders, event listeners, asset managers, etc, etc, etc. The complexity is on a whole different level.
>>
>>57078505
>weakly typed (Python, bash)
Python is strongly typed.
>>
Let's look at some benchmarks.
http://benchmarksgame.alioth.debian.org/

Highlights (from pic related):
>C is fastest, very closely followed by C++. As is to be expected, I suppose.
>Ada and Rust in top 5. Proof that adafags and rustfags aren't JUST memeing.
>Java at #5, performs at roughly half of C's speed. Shows that the "Java is slow" meme doesn't quite hold. Well, not fully, anyway. Probably still don't want to use Java for real-time embedded programs and stuff like that.
>C# is slower than Java, both on .NET and on Mono.
>Fortran is fast. C++-fast, even. Well, it CAN be, anyway. Its performance is kinda inconsistent here.

1/2
>>
>>57078818
And here are the "slow" languages. Pic related.
>The fastest of these (on average) is, slightly surprisingly, Node.js. Still ~9x slower than C.
>High variance on almost all of them.
>PHP, of all things, outperforms everyone's precious Ruby and Python. Dafuq?
>Racket is noticeably slower than its sibling Lisp was in the previous language.
>Most of these "slow" languages seem to be, if I'm not mistaken, weakly and/or dynamically typed ones.

2/2
>>
>>57078899
>>Racket is noticeably slower than its sibling Lisp was in the previous language.
previous image*
>>
>>57078899
The reason everyone hates PHP isn't it's performance. It's hated for it's insane typing system, and has historically had some terrible security holes.
>>
ruby so you can write metasploit modules
>>
>>57070897
In most cases languages aren't inherently "faster" or "slower". The implementations dictate this, as you'll find musl and glibc will come out with different performances for a variety of reasons.

>>57075529
Yes - for memory aliasing reasons, but stripping out the flag on C will cause them to perform pretty much neck to neck. FORTRAN booted off OpenMP, but C's pthreads is very precise and quite unforgiving, therefore many that work with more code opt for the simpler to use OMP.

And no, gcc has been using gfortran since the 90s. Overall, the state of gfortran is pretty good, pretty competitive with ICC, which speaks magnitudes considering not as much development surrounds it as C(xx).
>>
>>57073282
that's...counter intuitive
>>
Is anything written in C anymore? Any software that isn't niche or driver/OS development?

Don't tell me about microcontrollers, because that is today considered part of engineering rather than programming. It's right next to VHDL and assembly "programming". It's so close to the metal it qualifies more as engineering.

So what is C useful for today?
>>
>>57079542
>tfw like C but know I can't write safe C so I don't use it
>>
is python and perl the most god-tier combination ever constructed? why would you ever need to know any other languages?
>>
>>57079603
performance?
>>
>>57079603
perl is not as boring as python though
>>
>>57072670
We use lots of things written in Fortran in our chemistry department. It's great for academic purposes: simple and fast, and since it's been well used for decades there's loads of literature on using it.
>>
>>57072654
How am I supposed to know what your native language is?
>>
>>57079542
OSes and tons of programs and games use C. C++ has unfortunately been forced on us because many graphics toolkits and game engines use C++ because of the OO fad, and people just end up writing very C-like C++ anyway.
>>
>>57072654
This is why I'm voting for drumpf
>>
>>57076217
Soon we will have AIs analyzing code and making types explicit
>>
>>57075300
>posting on /a/ 2
>says Japan is a third world country
>>
>>57078598
In Java that would result in
error: incompatible types: String cannot be converted to int
>>
>>57075559

>Real programmers use assembly

With all the Mnemonics and stuff?
Are you Karlie Kloss?

Real programmers use the instruction set of the CPU
>>
>>57079603

>is python and perl the most god-tier combination ever constructed

protip:
use Ruby and you got both languages in one
Thread posts: 65
Thread images: 10


[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.