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

>https://benchmarksgame.alioth.debi an.org/u64q/compare.p

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: 33
Thread images: 3

File: [email protected] (12KB, 1224x618px) Image search: [Google]
python-1-562x309@2x-op.png
12KB, 1224x618px
>https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=python3
They teach this in schools. Holy shit.
>>
>>58752818
What are you trying to say here? They teach Python, but it sucks cause it's slower than Go or what?
>>
>>58752818
It has a shallow learning curve dickwheat.
Example:
https://github.com/squeaky-pl/japronto
>>
File: 1469219624359.png (4KB, 347x213px) Image search: [Google]
1469219624359.png
4KB, 347x213px
>mfw I decide to run python benchmarks with pypy3 and it ends up being faster than go

I used the same command they used for building the go program.

Python is now more than 30% faster, and that includes jit spinup time.
>>
File: thewhoreslaugh.jpg (55KB, 553x496px) Image search: [Google]
thewhoreslaugh.jpg
55KB, 553x496px
>>58753081
It's not just slow, it's 50 times slower than Go. It's a joke.

>>58753145
>https://github.com/squeaky-pl/japronto

> To be fair all the contestants (including Go) were running single worker process.
Are you retarded?

>The server is written in hand tweaked C trying to take advantage of modern CPUs.
You're not retarded, you're completely broken.
>>
>>58753342
>It's not just slow, it's 50 times slower than Go. It's a joke.
Get rekt faggot >>58753321
>>
>>58746666
>>
>>58752818
if you're using python for its performance you're using it wrong, that's why different languages exist
>>
>>58752818
>>58753580

Exactly. Different languages are best suited for different tasks. There is no one "best language" for every task. OP either knows this and is trolling, or OP is ignorant.

If you're writing a game engine where performance is absolutely critical, use a low level language like C++.

If you're writing a URL checker, use a high level language like Python. The latter can be written in like 7 lines of code, it's incredibly easy.
>>
>>58753656
Why can't they make some simple, high-level scripting language like python, but which is actually compiled into machine code instead of running in an interpreter? Surely you would have the conciseness of python and the speed (almost) of other languages?
>>
>>58753844
>high-level scripting language like python
Because a high level scripting language like python lets you do all kinds of weird magic shit that would be just as slow when compiled.
Python with pypy is reasonably fast.
>>
>>58754057
what about cython?
>>
python is used in cases where performance wasn't a priority to begin with.
>>
>>58753844
python is compiled dickweed

underage gtfo
>>
>>58754638
It does the bytecode pyc business, but it's not "compiled" in the traditional sense like other compiled languages. Python is an interpreted language.
>>
Python is fine for a lot of use cases from a performance standpoint. And if you need to write Python but have it perform fast, you just have to write fast Python and execute it fast.

https://www.youtube.com/watch?v=Iw9-GckD-gQ
>>
To be fair, the Python interpreter/jit is pretty shitty.

Does pypy even implement the latest spec?
>>
>>58754693
>3 hours of legacy python 2 code

ew, no thanks.
>>
>interpreted languages are slower than compiled languages
wow!!1
>>
Despite the fact that OP probably doesn't know a thing about python or performance, the performance issues with CPython (especially python3) are real.

Pypy and all the other implementations can only get you so far because as soon as you start losing important libraries using python becomes pretty much meaningless.
>>
>>58753844
Because such languages are usually safer and require more runtime components to function.

Ahead of time compiling adds less value over a just in time compiler other than reducing initial start up. So compiling to raw platform specific machine instruction is pointless.
>>
>I can't believe they're not teaching kids in CS-101 and 102 to write FizzBuzz and Hello World in a language that can compile it .00006 seconds faster and use 14 bits of memory less

autism
>>
>>58754740
>pypy
>losing important libraries
Unless you need to use numpy and its derivatives you'll rarely run into problems.
>>
>>58754057
>Python with pypy is reasonably fast.
"about 7 times faster than CPython on average" isn't reasonable fast

>>58754343
To produce fast code, you have to break with Python semantics. Might as well use Nim.
>>
>>58754900
THIS

WTF

WHY ARE THEY NOT USING PURE ASSEMBLY

ITS LIKE THEY WANT SLOW PROGRAMS
>>
>>58753844

>>58754837 is wrong. In fact, such languages exist. Such as golang, Crystal, Swift, C#(if you compile it to binaries)...
>inb4 they are less simple
At this point, they aren't. You might not know, but Python is a feature-laden monster.
>>
>>58755516
people are shitty at writing ASM with good perf tho

the C compiler is better than most humans at writing ASM
>>
CUDA is literally twice as fast as C

Why do retards still use C?
>>
>>58755384
numpy is a crucial library for scientific computing which is a main area python is used in. without it in many cases python is simply not usable, for example, tensorflow.

A more general issue is just the way extensions are handled, which means for any libraries that depend on it they need to be ported with significant costs which simply haven't happened yet. It's not a fault of the implementation per se but it does significantly limit its adoption.
>>
>>58753342
This poster is severly autistic, as evidenced by his lack of understanding why schools choose python.
>>
>>58755539
>golang
>high-level scripting language
Golang is an abomination that is trying to be a retard friendly C and is completely void of any high-level constructs.

>>58755465
>"about 7 times faster than CPython on average" isn't reasonable fast
If you actually try using pypy you'll notice that it's actually not that much slower compared to C# or Java.

>>58755684
If numpy and tensorflow are your main use case then python speed isn't that much of an issue because both of those libraries are implemented in C.
With that said, numpy already works in pypy to some degree and there's also an issue open for tensorflow which has some progress.
>>
LISP is the best language to teach kids
>>
Python is easy to learn and has a lot of databases and resources so it's very practical to teach it as a first/primary language.

It's kind of like learning martial arts in the military, as opposed to joining a MMA gym.
Thread posts: 33
Thread images: 3


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