[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>that one autist who chooses a ~3% gain in efficiency over
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 56
Thread images: 4
File: 1452303252661.jpg (138 KB, 652x648) Image search: [Google]
1452303252661.jpg
138 KB, 652x648
>that one autist who chooses a ~3% gain in efficiency over making his code actually readable.
>>
3% is a lot
>>
3%? so writing it in assembly instead of like java
>>
>Bro don't worry about efficiency at all who cares if it's O(n^5) time the compiler will like make it fast and shit
>>
>>54207311
That guy is literally saving the earth.
>>
File: 1453254280496.jpg (84 KB, 725x445) Image search: [Google]
1453254280496.jpg
84 KB, 725x445
and if you're a pajeet you get both unreadable code and woefully inefficient code

india is truly a superpower
>>
readability is subjective. if it is idiomatic, it barely matters if it is unreadable to a layperson, because idioms matter
>>
>>54207311
3% average case? if so, thats fine for large scale production stuff
if this is just for edge cases dont bother with it

>you have created mon more than one occasion several specific transpilers that take in your code and produce an optimized version of it for production (loop unroll, memoization, simd, etc) so you dont have to touch spaghetti code at all
>most of the time they expands code several exponential orders (20kb -> 6mb)
>tfw binary is marginally bigger (few kb) but performance improved a lot
>>
>>54207407
How did they get that picture of Rome?
>>
>>54208852
The Romans had cameras, duh.
>>
>>54207345
>>using big O notation on a Mandarin doodle sharing site
>>
I mean, if you have no intention of maintaining or extending the code, you may as well go for the efficiency.
>>
>>54207343
>3%? so writing it in assembly instead of like java

The compiler is exponentially better at writing assembly than humans are.

>>54207407
True
>>
>>54207311
maisie?
>>
>>54209145
Oh really? Who do you suppose wrote the compiler?
>>
>>54209270

g++ is written in C++.

As long as you have a decent interpreter, you can run your first compiler. From there, you compile each new release on your older compiler release.
>>
>>54209345
g++ is written in C you idiot. Read the fucking source code
>>
3% is a lot idiot
>>
Depends on what you are writing. If its some shitty javascript webapp then it is slow anyway and 3% doesn't make a difference.

Writing kernel code means that 3% percent is critical.

Know what the fuck you are doing before you go around optimizing shit.
>>
>>54209409

>The current stable version of GCC is 5.3, which was released on December 4, 2015.[47]

>As of version 4.8, GCC is implemented in C++.

https://en.wikipedia.org/wiki/GNU_Compiler_Collection#Languages

I'm not even mad
>>
>>54207407
Pretty sure Rome 2000 years ago didn't have a space program like India does now either, nice cherrypicking pic
>>
>>54209255
i am pretty sure based on my lurkings on /mu/ numerous years ago, that person is called Grimes
>>
>>54209958
Im pretty sure if rome was still around they would have one
>>
>>54209999
Rome is still around, Italy doesn't have any kind of meaningful space program of its own and haven't contributed shit to anything space related despite being fairly wealthy
>>
>>54209409
But then who compiled the compiler?
>>
>>54209958
throwing rocks into would-be orbit is a space program in the same sense that having a wagon with a 2 stroke strapped onto it is a race car
>>
>>54210020
Oh fuck I totally forgot that Italy is still around
>>
>>54210020
I suppose I got the technicallities wrong.

If the roman empire had survived and still controlled all the territories it did today, the world would be so radically different I couldn't predict the future.
>>
>>54210020

the Vatican City is the most meaningful space program of all time
>>
This is why I'm glad I'm not a programmer. You're called "autistic" if you're actually good at your job and other people have trouble keeping up. I don't want a career where I'm punished for being better than everyone else.
>>
>>54207311
>not documenting your code and getting the best of both worlds

"code artisans" are cucks
>>
>idiots that copy-paste and make your shitty corporate codebase even worse
>>
>>54210020
>Rome is still around
He meant Rome as in Roman Empire, the cradle of the superior civilizational circle you're not a part of, Pajeet.
>>
>>54210139

Why would you code for the admiration of your peers?

You code because you want to, and the admiration/bitches comes later when you're making lots of money.
>>
>>54210139
If you write barely readable code for non-performance critical applications that's only slightly faster than readable code, you're not good at your job.
>>
>>54210110
kek
>>
File: 1458244336663.jpg (226 KB, 869x1776) Image search: [Google]
1458244336663.jpg
226 KB, 869x1776
>>
>>54210524
>comparing a square root funtion to a max function
>using this many fucking comments for a simple max function

Babby coders detected
>>
File: image.gif (964 KB, 397x658) Image search: [Google]
image.gif
964 KB, 397x658
>>54210524
>return 5 le random
>>
>>54207311
3% is massive.

There are sacrifices that most be made just to make your code sustainable, like, you know, dividing it into modules.

But then you have idiots that, for example, don't use regex because "muh nobody understands that shit" and end up with more basic code but miles harder to understand.
>>
>>54210524
else if (a > b && b < a)

what the fuck? its the same thing
>>
>>54210041
you usually make the compiler in another language, and then you make a compiler in your language and compile it with the other compiler and now you have a compiler written in your language that can compile the next iterations of your compiler. This approach as a funny name I don't remember.
>>
>>54210646
the funyn thing is the max function could be implemented in one line.

return (a >= b)? a: b;
>>
>>54209145
>exponentially better at writing assembly than humans are
you have no idea what the fuck you're talking about, sheltered memejs cuck
>>
>>54210734
Of course it could. Just goes to show how stupid it is.
>>
>>54209409
how does it feel to get raped, anon?
>>
>>54209045
if you have no intention of maintaining the code, delete it and go home.
>>
>>54210730
https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
>>
>>54209045
Pajeet my son
>>
>>54210421
If the Mongolian empire was still around, Russians would all be speaking Mongolian.
If the Persian empire never broke apart, we'd all be Amir Hosseins.
I'm not Indian but you gotta pick one.. Blame the Pajeets or blame the corrupt government and years of colonization. The Pajeets are just trying to make it out of the literal shithole that they're living in.
>>
>>54207345
But what are the O and n variables?
>>
>>54210421
Indians are Indo-European moron.
>>
>>54210139
when sacrifice maintainability and prematurely optimize code without running benchmarks confirming that the code needs optimization, you're actually worse than everyone else and indeed shouldn't work as a programmer
>>
>>54210524
Holy fucking shit. I can't believe no one has mentioned it yet.

For Karlie's function, if a == b, the returned value is 5.

That is:

max (21, 49) returns 49. a < b. Correct.
max (101, 77) returns 101. a > b. Correct.

max (323, 323) returns 5. a == b. Wrong!

Hahaha! So, essentially, you ask Karlie's function, "What is the larger of 323 and 323?" It answers, "5."

Way to go, Ms. Supermodel! That's showing everyone how girls are smarter than boys. And nice going using an utterly nonsensical implementation as an example of a function a boy would right, nevermind she's comparing apples (square root function) with oranges (max function).
>>
>>54213659
Damn it. "right" should be "write" of course.
>>
>>54213680
damn right
Thread replies: 56
Thread images: 4

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.