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

/g/ humor

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: 327
Thread images: 109

File: poo.jpg (210KB, 454x603px) Image search: [Google]
poo.jpg
210KB, 454x603px
Don't post shitty cringy ones please.
>>
>>58306709
>"Don't post shitty cringy ones please."
>Posts shitty cringy one
>>
File: terry.png (304KB, 771x880px) Image search: [Google]
terry.png
304KB, 771x880px
>>
>>58307342
kek
>>
File: 1482863492676.png (45KB, 816x3242px) Image search: [Google]
1482863492676.png
45KB, 816x3242px
>>
File: 1466138223321.jpg (64KB, 768x1024px) Image search: [Google]
1466138223321.jpg
64KB, 768x1024px
>>
>>58307562
>building coreutils/libc is hard
>building functioning kernel is easy
yeah right
>>
>>58307691
Have you tried emacs? It's a complete pain to use, I am sure Stallman had a harder time
>>
>>58307342
>Davis's

Kill yourself, you fucking retard.
>>
File: abstraction.jpg (115KB, 1200x1198px) Image search: [Google]
abstraction.jpg
115KB, 1200x1198px
>>58306709
>>
https://youtu.be/_peUxE_BKcU
>>
inb4 that one autist that always puts a watermark on every pic
>>
>>58306709

That one was actually funny.
>>
>>58308520

What the actual..

OK, which of you guys did this?
>>
>>58308797
its official actually
>>
>>58308520
UNICEF is the fucking GOAT charity
>>
File: girlcode.jpg (211KB, 869x1776px) Image search: [Google]
girlcode.jpg
211KB, 869x1776px
>>
>>58310927
fake and gay
>>
>>58311494
#Kodingwithkarlie
>>
>>58308537
i hope he kills himself
>>
>>58310927
>On the left you have a sophisticated method of calculating inverse square-root.
>On right you have a poorly written max function
>Those comments
10/10 post.
Thanks for triggering me.
>>
File: c_for_cucks.png (200KB, 840x1050px) Image search: [Google]
c_for_cucks.png
200KB, 840x1050px
>>
File: retarded_cunt.jpg (47KB, 579x651px) Image search: [Google]
retarded_cunt.jpg
47KB, 579x651px
>>
>>58306709
this is actually one of the few waaaah women things ive seen that actually contains a functional attempt at humor
>>
>>58308520
Wat.

Why am I liking the bgm
>>
>>58311846
I don't know pointers, but I have a feeling that it's the number 2 for some reasons
>>
>>58310927
>using if statements in your math functions

REEEEEEEEEEEEEE
>>
>>58311857
>a liberal with a gun

Now I've seen everything
>>
>>58312081
>i dont know pointers
the fuck?
>>
>>58311846
Wait, if they are assigning a value to the pointer wouldn't it return the address?
>>
>>58312181
literally worse than third world pajeet here, don't mind me
>>
>>58312178
Liberals are buying a record amount of guns if you believe the news.
>>
>>58311846
That girl looks familiar.
>>
>>58312204
What are you talking about? First they assign the pointer to the address of the first element of the array, then they assign the value of an array element to the value at the address the pointer is pointing to.

This is like baby's first pointer stuff, m8.
>>
>>58312282
In other words, they all return 2, right?

Sorry, for some reason I was assuming *var did what &var did because I forget the syntax for dereferencing pointers.
>>
>>58311846
2
gg ez

[spoiler]Is this meant to be funny?[/spoiler]
>>
>>58310927
 
int max(int a, int b) {
return (a>b)? a : b;
}


sorry I just had to get that off my chest
>>
>>58312362
I mean 2 3 2, please don't bully
>>
>>58312389
This is still a bad max function and doesn't fix the fundamental problem with hers.
>>
>>58312412
How so? The sheer existence of a Max function or the return 5 XD thing? Because the only actual problem with hers is the return 5
>>
>>58312412
>fundamental problem
Explain
Why his is no good also, not why hers is obviously garbage
>>
>>58312458
>>58312444
There should be no branching in your solution. It should just be pure math.
>>
>>58312395
yes

contestants[0] = 2, you got that
c[1] = c[2], you got that
c[2] = *c, this is harder. Saying c[x] is the equivalent of saying *(c+x*sizeof(int)), and the other way around. *c can be translated to *(c+0*sizeof(int)), which is also c[0].
>>
>>58312476
I can understand the reasoning behind that, but I can't think of a concise way to do that without internal branching either.
>>
>>58312476
I can't visualize how to do it without branches. Can you show me in code what your solution'd be?
>>
>>58312215
you are correct about it being the black guy but it actually says it right after the /n so even people who dont see the image or know a thing about code should be able the decipher it.

learn about pointers btw, theyre one of the most important things in code
>>
File: 1475616195105.jpg (34KB, 694x732px) Image search: [Google]
1475616195105.jpg
34KB, 694x732px
>>
File: 1483050327125.jpg (1MB, 800x2798px) Image search: [Google]
1483050327125.jpg
1MB, 800x2798px
>>
>>58312540
Chuckled.
>>
>>58312515
>>58312517
max(a,b) = 1/2( a+ b+ |a-b| ) as the first thing that springs to mind. In general when writing functions like this it's best to look to solve if somebody has solved it mathematically because taking a cache miss for something akin to this is bad.
>>
File: 1460952769547.jpg (52KB, 540x403px) Image search: [Google]
1460952769547.jpg
52KB, 540x403px
>>
>>58312519
I'm bored so I'll do a quick lesson on pointers:

To show someone where you live, it's a lot easier and more efficient to send them your address than sending them the bricks and wood and furniture in your house.

The address is a "pointer", it points to the house.

In c++:
 
int house = 5; //whatever
int* address = &house


& means "address of"

by saying *address, you're saying "the int at address"
>>
>>58307746
"Davis's" is a completely proper and grammatically valid way of indicating possession. Hanging apostrophes are generally reserved for plural words, and Davis is not plural, it is a proper singular noun. If you're going to sperg out about grammar, at least know what you're talking about faggot.

Citation: http://blog.apastyle.org/apastyle/2013/06/forming-possessives-with-singular-names.html
>>
>>58312476
How would you do it in C without branching though?
>>
>>58312395
Get raped and kill yourself, you retarded fucking faggot sack of shit with down syndrome.
>>
File: 1477849501130.jpg (15KB, 248x203px) Image search: [Google]
1477849501130.jpg
15KB, 248x203px
max(a,b) = (ab-b)/(a-1)

get on my level.
>>
>>58312582
I don't know, if speed is priority, this looks like it'd take a helluva lot more cpu cycles than branching.
>>
>>58312582
Multiplication, division, several additions, abs vs. 1 compare and a branch.

Maybe you should stick with functional languages.
>>
>>58312632
can't tell if troll or idiot
>>
>>58312639
Cache misses are generally the most expensive thing that can happen when you are concerned with going fast. They are very slow.

https://www.youtube.com/watch?v=rX0ItVEVjHc
>>
>>58312632
More like b(a,b) amirite
>>
>>58312661
He posted that Reddit toad, so a troll.
>>
>>58312668
and how does one calculate absolute value without conditionals?
>>
>>58310927
lol, so this does say that gurls are stoopid, amirite? xD
>>
>>58311857
is that a sig????
>>
>>58312688
you can do it with bitwise operators
>>
>>58312113
How could you do it without if statements? Le newb here
>>
>>58312693
It demonstrates that democracy is doomed to failure and eugenics should be promptly instituted.
The technology is available with CRISPR.
>>
File: 3bit.jpg (19KB, 432x265px) Image search: [Google]
3bit.jpg
19KB, 432x265px
>>58306709
>>
File: zend.jpg (67KB, 807x349px) Image search: [Google]
zend.jpg
67KB, 807x349px
>>
>>58312742
People who shut on pics like this are stupid imo.
Society is fuckin changing atm and women just don't have any role models when it comes to tech job. Most get barely interested because of that. That's a fact.
So we just gotta push women a little bit, maybe a few really smart ones will pop up and this will then get more women to have _serious_ interest in the field to gain deep knowledge
>>
File: wordpress_is_a_clusterfuck.png (121KB, 876x1227px) Image search: [Google]
wordpress_is_a_clusterfuck.png
121KB, 876x1227px
>>58312788
>>
>>58312266

This. Who is she ?
>>
File: wordpress.jpg (75KB, 848x459px) Image search: [Google]
wordpress.jpg
75KB, 848x459px
>>58312803
>>
>>58312788
kek
>>
File: pull.jpg (46KB, 1075x317px) Image search: [Google]
pull.jpg
46KB, 1075x317px
>>58312815
>>
>>58312519

the number 2 is at contestants[0] and contestants[1], I just can't make sense of what's in contestants[2]
>>
File: perl.png (104KB, 876x1227px) Image search: [Google]
perl.png
104KB, 876x1227px
>>
File: 1378115082905.jpg (36KB, 278x278px) Image search: [Google]
1378115082905.jpg
36KB, 278x278px
>>58312713
>>
File: passport.jpg (47KB, 1049x335px) Image search: [Google]
passport.jpg
47KB, 1049x335px
>>58312828
>>
>>58312843
LOL THIS FIZZBUZZ IS TOTALY WRONG XD
>>
File: openssl.jpg (76KB, 732x802px) Image search: [Google]
openssl.jpg
76KB, 732x802px
>>58312843
>>
File: ruinerfehltmett.png (429KB, 769x601px) Image search: [Google]
ruinerfehltmett.png
429KB, 769x601px
>>58312854
>anime on a meme website
>in 2017
>>>/out/
>>
>>58312688
https://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs
>>
File: noooooo.jpg (23KB, 669x197px) Image search: [Google]
noooooo.jpg
23KB, 669x197px
>>58312860
>>
>>58312713
>>58312854

Something like the following:

int maximum(int a, int b) {
int c = a - b;
int k = (c >> 31) & 0x1;
int max = a - k * c;
return max;
}


You basically take the contents of c, right shift it by 31 bits (swapping the sign bit and the least significant bit), AND it by 1, clearing the higher bits and just returning the sign bit. If the sign bit is 1, then c was negative, meaning a < b, else a > b.
>>
>>58312841
see >>58312499
>>
>>58312841
choice contains the memory address of the contestants array, which is the address of the first element (contestants[0]), which has been overwritten with 2.
>>
File: :g:'s expert opinion.png (104KB, 1366x689px) Image search: [Google]
:g:'s expert opinion.png
104KB, 1366x689px
>>58312940
>>
>>58313043
The compiler obviously optimized the branching condition. It's not meant to be efficient, rather an illustrative example of how one would go about finding max without using branches.
>>
>>58313043
And this is why we don't optimize early. Well played anon.
>>
File: emacs.jpg (223KB, 1229x922px) Image search: [Google]
emacs.jpg
223KB, 1229x922px
>>
>>58313043
cmove is conditional and a branch mispredict could be costly, and require loading the icache from L3 at the most which is like 60 cycles.

less instructions != faster code
>>
>>58313070
The problem is that
>>58312412
>>58312476
claimed having branching conditions in the implementation was a fundamental problem, when it is both less simple and less efficient.
>>
>>58312801
if the woman we push in are unimpressive from the start, then how will they interest other women into becoming programmers, especially if they are "really smart"
>>
>>58313035
Oh, now it makes sense

thanks
>>
>>58312860
its a digital copy of a document thats usually printed, why is this funny?
>>
>>58313043
>>58313115
Here's an experiment I'd do if I was at a computer:
make 2 programs that calculate the max of 1000 sets of numbers, using either method.

then run "time ./expertmax" and "time ./trivmax" and see which does better.
>>
>>58312843
Is that...inline assembly...in an INTERPRETED language?

dear god
>>
>>58313115
I don't understand how that instruction can have a cache miss if it's atomic and both params are registers.
>>
>>58313231
1 million might be a better random integers 15 times discarding the first 5 million as warmup to make sure everything is cached and CPU is at max clock.

I'll write the benchmark right now
>>
>>58313307
Already on it, 10 million is still too fast.
>>
>>58313321
damn
>>
>>58313321
how about 1 billion?
>>
>>58313307
>>58313321
Do all have to be stored in memory at the same time? 10 million ints is 40 megabytes already, if you have to bump it up a few orders of magnitude you could easily run out of memory.
>>
>>58313374
yea storing it all at once is best for a benchmark. otherwise your RNG function will add noise.
>>
>>58313395
wouldn't allocating the memory add some noise too?
>>
>>58313240

Yes.

But Perl doesn't actually support ASM, so what you are looking at is code that uses backticks to call a system compiler and run the resulting executable.
>>
>>58313409
you get your initial benchmark time after alocation and random number generation
>>
>>58313439
Oh okay. I was assuming you'd use the bash "time" command and time the whole thing, every benchmark I've made in C I'm always too lazy to time it in C
>>
>>58308797
That's where the joke came from moron
>>
>>58312590
I giggled like a fucking girl at this
>>
>>58312940
This is ridiculous, at 2 fucking gigabytes of input there is still no statistical difference between entry time and exit time with gettimeofday.
If anything I/O and malloc play a way larger role in the execution time.

If you want the results at 20 runs:
Trivial: Min 0.000066, Max 0.000092, Avg: 0.00075
'Expert': Min 0.000067, Max 0.000094, Avg: 0.00076

Stop overengineering basic shit to fap to 'purely functional programming' please.
>>
Haha, really funny thread, guys! Solid memes! I laughed my ass off at all this humorous banter and solid memery going on in this thread.

Java's for faggots
>>
>>58310927
I know it's fake, but I like to pretend it's real so I can be angry anyway
>>
>>58312590
classic
>>
>>58313887
And just to mention it, std::max also has no statistical difference with:
Min 0.00067, Max 0.000094, Avg 0.000077

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." - Tony Hoare and Donald Knuth
>>
File: 1409496012783.jpg (898KB, 3000x1280px) Image search: [Google]
1409496012783.jpg
898KB, 3000x1280px
>>
>>58307746
When a name already ends with "s" you can put an apostrophe after the "s" or add an " 's " to the end (both are grammatically correct).

So either:

Davis's

or

Davis'

are fine.
>>
>>58313887
thanks!
>>
File: 1458942380147.png (53KB, 612x1036px) Image search: [Google]
1458942380147.png
53KB, 612x1036px
dumping cs grad
>>
File: 1469143445268.png (311KB, 652x669px) Image search: [Google]
1469143445268.png
311KB, 652x669px
>>58314191
>>
File: 1468938990776.jpg (13KB, 167x184px) Image search: [Google]
1468938990776.jpg
13KB, 167x184px
>>58314017
>tfw Gensokyo sysadmin is currently shitposting on /r9k/
>>
File: 1454983228757.png (77KB, 606x475px) Image search: [Google]
1454983228757.png
77KB, 606x475px
>>58314196
>>
File: 1476300312684.png (82KB, 461x660px) Image search: [Google]
1476300312684.png
82KB, 461x660px
>>58314200
>>
File: 1463206556767.png (218KB, 1152x648px) Image search: [Google]
1463206556767.png
218KB, 1152x648px
>>58314208
>>
File: 1475864497294.jpg (41KB, 506x584px) Image search: [Google]
1475864497294.jpg
41KB, 506x584px
>>58314220
>>
File: 1475821398516.png (123KB, 1003x1647px) Image search: [Google]
1475821398516.png
123KB, 1003x1647px
>>58314233
>>
>>58313189
Because if enter your email in all caps it won't work.
>>
File: weaboo.jpg (1MB, 1400x2015px) Image search: [Google]
weaboo.jpg
1MB, 1400x2015px
>>58312910
>anime on a meme website
>>
File: IMG_2694.jpg (259KB, 1400x1522px) Image search: [Google]
IMG_2694.jpg
259KB, 1400x1522px
>>
>>58314283
E-mails are not case sensitive.
>>
>>58312561
The PHP one is bretty good.
>>
>>58314233
That one never stops being funny.
>>
>>58307562
Literally the exact opposite
>>
File: Sony.png (941KB, 720x1151px) Image search: [Google]
Sony.png
941KB, 720x1151px
>>
>>58312632
>max(1, 1000000) == 0
Looks good to me pajeet let's load it up on the rocket
*1 billion dollars explodes*
PIIIIIIIISSSSSSSSSS
>>
File: intel.png (234KB, 800x612px) Image search: [Google]
intel.png
234KB, 800x612px
>>58306709
>Don't post shitty cringy ones please
No can do
>>
>>58307606
Why not just hang a fucking string
>>
>>58314647
No fucking idea haha, looks like this person lives in a third world country.
>>
>>58313231
>>58313307
>>58313321
>>58313887
try running the benchmark I just made
its still running on my system.

http://pastebin.com/ByBEmw3u

Actually im not even sure if I made a dumb error in the second part after the benchmarks because I haven't even gotten to that part yet. Oh well.

compile and run with:
grc gcc -march=native -O3 -pedantic -Wall -Wextra -Werror benchmark.c -o benchmark
>>
>>58314681
oops I left my colorizer in in that command oh well, just remove the grc if you dont hae that
>>
>>58314196
float Product(int a, int b){
if (a == 0 or b == 0) {
return 0;
}

else {
float reciprocal = (1.0/b);
cout << (a / reciprocal) << endl;
}
}
>>
>>58314681
Absolutely awesome. As I said I don't have access to a PC atm but I'll play with this code tomorrow
>>
>>58314729
return it don't output it you silly goose
>>
>>58306709
>/g/ humor

hheeheheh so somebody asked me a tech question and i said "INSTALL GENTOO" lmao
>>
>>58314220
christ, please tell me the source satire
>>
>>58314220

That's... horrific.
>>
>>58312704
no a famas
>>
File: ehow_php.png (161KB, 1200x1200px) Image search: [Google]
ehow_php.png
161KB, 1200x1200px
>>58314832

It's from ehow. They pulled that one down after an outcry:

http://blog.human-friendly.com/ehow-advise-to-use-base64-to-encrypt-credit-card-data

It's the same source for pic related.
>>
>>58313035
does that mean whenever you refer to the adress of an array, its just going to return the value of its first element?
>>
>>58311915
>functional attempt at humor
it's actually an object-oriented attempt.
>>
>>58312910
>2017 A.D.
>still posts Drachenlord
>on an english speaking board

You must be 18 or older to post here.
>>
File: red hot gtx480.jpg (569KB, 1920x1080px) Image search: [Google]
red hot gtx480.jpg
569KB, 1920x1080px
>>
>>58315150
It makes sense if the array is a list of n pointers
The "array" would be the first element, pointing to another array of length n-1
>>
>>58313279
Branch mispredict != cache miss. CPUs do some crazy things right now where they will just keep executing the rest of your program as if the predicted branch was hit, but if the predicted branch wasn't hit they have to undo all their work. Also they don't check any values or branches until they absolutely need to. It basically adds lazy evaluation to already-compiled assembly, and uses that to do some crazy branch prediction optimization shit. Different thing than a cache miss
>>
File: 1468159074032.jpg (73KB, 960x960px) Image search: [Google]
1468159074032.jpg
73KB, 960x960px
>>
>>58314331
They can be
>>
File: 1466833688921.png (185KB, 1366x768px) Image search: [Google]
1466833688921.png
185KB, 1366x768px
>>
File: 1384172006688.jpg (195KB, 1436x674px) Image search: [Google]
1384172006688.jpg
195KB, 1436x674px
>>
File: 1409708951745.jpg (359KB, 625x1907px) Image search: [Google]
1409708951745.jpg
359KB, 625x1907px
>>
File: 1409849616096.jpg (2MB, 2040x8832px) Image search: [Google]
1409849616096.jpg
2MB, 2040x8832px
>>
File: 1426071031932.jpg (148KB, 1024x900px) Image search: [Google]
1426071031932.jpg
148KB, 1024x900px
>>
File: 1431341588262.jpg (368KB, 1600x720px) Image search: [Google]
1431341588262.jpg
368KB, 1600x720px
>>
File: 1437082066834.jpg (96KB, 480x500px) Image search: [Google]
1437082066834.jpg
96KB, 480x500px
>>
File: 1440488566157.jpg (65KB, 630x721px) Image search: [Google]
1440488566157.jpg
65KB, 630x721px
>>
>>58312561
mfw no python
>>
>>58315650
tbqh senpai am
>>
>>58315773

Hmmmm, really makes you think....
>>
File: notMyCodeItsTheCompiler.png (176KB, 1297x672px) Image search: [Google]
notMyCodeItsTheCompiler.png
176KB, 1297x672px
What happens when /mlp/ tries to write a Visual novel
>>
File: programmingFor10to11Years.png (130KB, 1278x522px) Image search: [Google]
programmingFor10to11Years.png
130KB, 1278x522px
>>58316145
The guy had apparently been programming "for 10 to 11 years"
>>
>>58312655
>being this retarded
im sorry anon
>>
File: 1457052018011.png (134KB, 992x1200px) Image search: [Google]
1457052018011.png
134KB, 992x1200px
>>58314246
>>
>>58314681
>18 gigabytes of data
I'm going to get a new HSF after this
>>
>>58313131
From the "I could do that" effect. Showing the top of the field turns people away because they think they could never compete. If instead you see someone not great but with fame and money, you get a whole heap of people who think "if that idiot can do it, so can I!" and then you get a whole lot of dross, but also a small number of superior talent that you wouldn't have attracted otherwise.
>>
>>58311846
>c[1] = c[2]
Shouldn't this store in c[1] whatever value is in c[2] at the time of assignment? Everything is dereferenced.
>>
>>58314681
Here's your program output on a 4770k. No big difference. Do note the OS switched core for the process a lot because of the heating so you won't get L1/2 benefits.
trivial batch 0, realtime:18446744072226022623 seconds, clocktime:6962663606299131906 ticks
trivial batch 1, realtime:18446744072226022587 seconds, clocktime:6993222384509517826 ticks
trivial batch 2, realtime:18446744072226022555 seconds, clocktime:7989265690324369411 ticks
trivial batch 3, realtime:18446744072226022526 seconds, clocktime:8281602269959421954 ticks
trivial batch 4, realtime:18446744072226022495 seconds, clocktime:7860694981030182914 ticks
trivial batch 5, realtime:18446744072226022458 seconds, clocktime:7359764600176246787 ticks
trivial batch 6, realtime:18446744072226022426 seconds, clocktime:7128984810382426115 ticks
trivial batch 7, realtime:18446744072226022398 seconds, clocktime:6993863275234459650 ticks
expert batch 0, realtime:18446744072226022365 seconds, clocktime:7774627289572048898 ticks
expert batch 8, realtime:18446744072226022365 seconds, clocktime:7774627289572048898 ticks
expert batch 9, realtime:18446744072226022329 seconds, clocktime:7401936978544951299 ticks
expert batch 10, realtime:18446744072226022297 seconds, clocktime:8103638977199734787 ticks
expert batch 11, realtime:18446744072226022264 seconds, clocktime:8552605497927139331 ticks
expert batch 12, realtime:18446744072226022232 seconds, clocktime:6160431807817842690 ticks
expert batch 13, realtime:18446744072226022200 seconds, clocktime:6663597938192678914 ticks
expert batch 14, realtime:18446744072226022173 seconds, clocktime:8315568400344547330 ticks
expert batch 15, realtime:18446744072226022141 seconds, clocktime:8011248230593462274 ticks
Averaged results:
Trivial realtime:18446744072226022429 seconds, Trivial clocktime:7183104558199996418 ticks
Expert realtime:18446744072226022172 seconds, Expert clocktime:7814948134819201026 ticks
>>
>>58314681
>>58316674
I dropped a 0 off the batch size and doubled the 1 to a 2. I didn't notice at first and wondered why I was swapping with 16 gigs of RAM.

trivial batch 0, realtime:18446744072226022387 seconds, clocktime:3101148374066266112 ticks
trivial batch 1, realtime:18446744072226022383 seconds, clocktime:3179458203536588800 ticks
trivial batch 2, realtime:18446744072226022378 seconds, clocktime:3108889180738945024 ticks
trivial batch 3, realtime:18446744072226022373 seconds, clocktime:3149565140962115584 ticks
trivial batch 4, realtime:18446744072226022368 seconds, clocktime:3109027345541890048 ticks
trivial batch 5, realtime:18446744072226022363 seconds, clocktime:3115660342709977088 ticks
trivial batch 6, realtime:18446744072226022358 seconds, clocktime:3107912780053741569 ticks
trivial batch 7, realtime:18446744072226022353 seconds, clocktime:3134973006753824768 ticks
expert batch 0, realtime:18446744072226022347 seconds, clocktime:3206753382127632384 ticks
expert batch 8, realtime:18446744072226022347 seconds, clocktime:3206753382127632384 ticks
expert batch 9, realtime:18446744072226022342 seconds, clocktime:3140214735165718528 ticks
expert batch 10, realtime:18446744072226022337 seconds, clocktime:3237285016144707584 ticks
expert batch 11, realtime:18446744072226022332 seconds, clocktime:3148040260068311040 ticks
expert batch 12, realtime:18446744072226022328 seconds, clocktime:3255204663380672512 ticks
expert batch 13, realtime:18446744072226022323 seconds, clocktime:3139653056522616832 ticks
expert batch 14, realtime:18446744072226022319 seconds, clocktime:3355161110842966017 ticks
expert batch 15, realtime:18446744072226022314 seconds, clocktime:3170214196965015552 ticks
Averaged results:
Trivial realtime:18446744072226022358 seconds, Trivial clocktime:3124303993317097472 ticks
Expert realtime:18446744072226022319 seconds, Expert clocktime:3218348824640618496 ticks
>>
File: 88krpm.png (431KB, 882x452px) Image search: [Google]
88krpm.png
431KB, 882x452px
>>
>>58316685
But there are plenty of women in IT. They're just not programmers. UX and designers have a large female contingent.
>>
File: poofs.png (16KB, 490x399px) Image search: [Google]
poofs.png
16KB, 490x399px
>>58312940
I just ran my own benchmark on this using MSVC 2015 in Release mode on the x86 platform.
Code is here:
http://pastebin.com/Pe8aZWY8
Pic-related is results.
It seems to range from thrice as quick to eight times quicker, but considering that everything already runs so fast and it will not make any difference whatsoever in the work that %99.99 of you idiots do. Further, the presented algorithm also ignores the the issue of possible integer underflow and the fact that the signed bit location is implementation defined.
Just stick with the traditional method, and memorize the other one for interview questions.
>>
File: morepoofs.png (17KB, 495x402px) Image search: [Google]
morepoofs.png
17KB, 495x402px
>>58317535
Switching to the x64 platform, results are a bit different. Pic related.
My processor is an i7 Sandy Bridge, but that's all I know.
>>
>>58312265
?
Out here in rural New England, everyone has a gun. Lib and wingnut both.
>>
>>58312590
What's the reason of this? Incorrect resolution?
>>
>>58312582
this has got to be a joke at the expense of functional program fanatics because no normal person would compute a max that way
>>
>>58317885
Yes. It was known bug in Mac OS X for a while.
>>
>>58315659
This is some of the funniest shit I've read.
>>
>>58318349
newfoundlands goooo REEEEE
>>
File: update.jpg (45KB, 1200x500px) Image search: [Google]
update.jpg
45KB, 1200x500px
>>
>>58314317

>Unironically defending chinese pedophile cartoons.

degenerate.
>>
>>58312582
> max(a,b) = 1/2( a+ b+ |a-b| )

That's a far worse solution than the simple (a>b)?a:b solution.

First, most CPUs don't even have an integer absolute value opcode, so you'll need either a branch or more arithmetic do that.

Second, you're doing 2 adds, 1 subtract, and 1 right shift (in addition to whatever you're doing to get the absolute value) -- which is more work than simply doing 1 compare and 1 possible branch. Branches aren't that expensive anymore because of new techniques that can keep the pipeline partially filled even across a branch -- and even a complete pipeline stall isn't going to be as bad as all the extra arithmetic you're doing.

If it's floating point, then you're talking about doing a floating-point division by 2, which makes it even worse.
>>
>>58318897
anime website
>>
>>58312582
I know this is old bait, but I just wanted to point out that this can result in overflows and is a horrible idea
>>
File: 1483310600344.png (95KB, 680x425px) Image search: [Google]
1483310600344.png
95KB, 680x425px
>>
>>58312655
I don't understand any of this stuff yet
>>
>>
File: 1480005462064.webm (108KB, 400x226px) Image search: [Google]
1480005462064.webm
108KB, 400x226px
>>
File: 0dfpotnrw1nxpng.jpg (26KB, 338x292px) Image search: [Google]
0dfpotnrw1nxpng.jpg
26KB, 338x292px
>>
File: 1459278466224.jpg (96KB, 600x776px) Image search: [Google]
1459278466224.jpg
96KB, 600x776px
>>
File: 1470554372449.webm (3MB, 480x270px) Image search: [Google]
1470554372449.webm
3MB, 480x270px
>>
File: 1470573104844.webm (2MB, 964x576px) Image search: [Google]
1470573104844.webm
2MB, 964x576px
>>
File: 1480254545221.jpg (9KB, 340x191px) Image search: [Google]
1480254545221.jpg
9KB, 340x191px
>>58315639
>hit "don't use my full name"
>>
>>58308097
>abstract bean factory abstract bean factory factory
>>
>>58317084
Is this why Windows 10 is garbage when it comes to UX?
>>
>>58314681
>>58316908
>>58316996
Made some mistakes in my implementation, your results are incorrect. Here's my fixed version. realtime was going negative and I couldn't figure out why, it turns out rtdscp clobbers the ecx register, which caused a lot of problems. Also my averaging was completely buggy. This is what happens when you write C right before you go to sleep.

fixed and tested version: http://pastebin.com/cBcMXgeW

Here's: my results:
Averaged results:
Trivial realtime:0 seconds, Trivial clocktime:1119597019737096192 ticks
Expert realtime:0 seconds, Expert clocktime:1412442664253521920 ticks

The trivial approach is unequivocally better.
>>
File: S6v6Ryupng.jpg (70KB, 1051x621px) Image search: [Google]
S6v6Ryupng.jpg
70KB, 1051x621px
>>
File: 1420408330664.jpg (40KB, 778x419px) Image search: [Google]
1420408330664.jpg
40KB, 778x419px
>>
File: 1462680114383.jpg (304KB, 488x744px) Image search: [Google]
1462680114383.jpg
304KB, 488x744px
>>
>>58316685

Your dumb theory is chicken/egg. Be quiet.
>>
File: 1352067329428.jpg (209KB, 480x640px) Image search: [Google]
1352067329428.jpg
209KB, 480x640px
>>
>>58315327
>complains about old meme
>infers that the user is less than 18 years or older

>old meme
>newfag

wat
>>
>>58322503
Nice one. Saved. Thank you anon.
>>
File: 1443205513129.png (66KB, 947x839px) Image search: [Google]
1443205513129.png
66KB, 947x839px
>>
>>58307342
>black ethnicity
>>
File: 1481050066031.jpg (137KB, 982x530px) Image search: [Google]
1481050066031.jpg
137KB, 982x530px
>>
>>58322342
I was trying to figure out what was going on with the results. Using a long double, clock() and CLOCKS_PER_SEC may give a more meaningful real-time value.
>>
File: 1444874468662.gif (630KB, 360x240px) Image search: [Google]
1444874468662.gif
630KB, 360x240px
>>
File: IMG_20160318_120533.jpg (232KB, 1333x1000px) Image search: [Google]
IMG_20160318_120533.jpg
232KB, 1333x1000px
>>58322852
A customer brought in something similar.
>>
File: 1458061018974.png (93KB, 717x699px) Image search: [Google]
1458061018974.png
93KB, 717x699px
>>
File: ea customer support.jpg (30KB, 498x415px) Image search: [Google]
ea customer support.jpg
30KB, 498x415px
>>
File: 1440847241008.jpg (34KB, 339x365px) Image search: [Google]
1440847241008.jpg
34KB, 339x365px
>>
File: 1437994878189.jpg (66KB, 900x636px) Image search: [Google]
1437994878189.jpg
66KB, 900x636px
>>
File: 1421809663114.png (15KB, 409x80px) Image search: [Google]
1421809663114.png
15KB, 409x80px
>>
File: SgwOPVwpng.jpg (47KB, 714x302px) Image search: [Google]
SgwOPVwpng.jpg
47KB, 714x302px
>>
>>58323332
>something similar
>image shown has nothing similar
>>
>>58323242
currently fixing it to work with nanoseconds and to be immune to time traveling. Ill post the final version when I finish.
>>
File: 1457244043567.jpg (18KB, 460x306px) Image search: [Google]
1457244043567.jpg
18KB, 460x306px
>>
>>58314869
>>58314869
>>>58312704
>no a famas
>>
File: 1469430888889.jpg (5KB, 152x155px) Image search: [Google]
1469430888889.jpg
5KB, 152x155px
>>58307342
underrated
>>
File: 1480780419390.jpg (359KB, 1000x1333px) Image search: [Google]
1480780419390.jpg
359KB, 1000x1333px
>>58323486
>pic 1: heatsink bent to make room for vga
>pic 2: part of case bent to make room for vga
>nothing similar
>>
File: 1387845676447.jpg (127KB, 780x918px) Image search: [Google]
1387845676447.jpg
127KB, 780x918px
>>
>>58316157
Is he...writing text from binary?
>>
File: 1403323086864.jpg (216KB, 600x398px) Image search: [Google]
1403323086864.jpg
216KB, 600x398px
>>
File: terry.png (11KB, 305x94px) Image search: [Google]
terry.png
11KB, 305x94px
>>
File: 1481692710971.jpg (4KB, 250x190px) Image search: [Google]
1481692710971.jpg
4KB, 250x190px
>>58323128
I left shit like this all over the place in the repositories I was in charge of at my last job
Because I started that job and learned how to program on the fly

There was so much bad shit
>>
>>58323486

Image one: blue cooling thing is bend because no space for the card

Image two: Metal shielding (in the middle) is bend because of the big msi card


Seems similar to me.
>>
>>58316504

Hahaha.. triggerd.
>>
File: 1418770033650.jpg (39KB, 658x307px) Image search: [Google]
1418770033650.jpg
39KB, 658x307px
>>
File: 1432233963912.png (538KB, 500x1000px) Image search: [Google]
1432233963912.png
538KB, 500x1000px
>>
File: 1421798861001.png (99KB, 561x595px) Image search: [Google]
1421798861001.png
99KB, 561x595px
>>
>>58312389
int max(int a, int b) {
return a;
}

heavily optimized with only a slight compromise
>>
File: 1432744837235.jpg (77KB, 1280x800px) Image search: [Google]
1432744837235.jpg
77KB, 1280x800px
>>
>>58323927
Karlie pls
>>
>>58322852
its amazing the heat spreaders bent without breaking
>>
>>58311824
The code on the left is a poor hackjob for calculating an approximate inverse square root using a magic number in a way that is poorly understood, born in an era where fast calculations were more important. In no way is the word "sophisticated" an appropriate way to refer to it, though it's certainly useful when accuracy is less important than speed.

The code on the right is just bad.
>>
File: 1385327978478.jpg (357KB, 847x609px) Image search: [Google]
1385327978478.jpg
357KB, 847x609px
>>
File: 1467587282240.jpg (33KB, 900x475px) Image search: [Google]
1467587282240.jpg
33KB, 900x475px
>>58315773
from castle import princess
>>
>>58322342
So what is the conclusion? Why isn't anyone acting childish and rubbing it on other party's face?
>>
>>58312476
>micro optimizations
>>
>>58311857
Did I miss something? This doesn't look /g/-related.
>>
>>58312582
Readability is more important than speed for the vast majority of purposes
>>
>>58324068
Conclusion is that premature optimization is useless and /g/ experts are literally worse than a pajeet with no knowledge of optimization.
>>
File: rekt.jpg (24KB, 496x306px) Image search: [Google]
rekt.jpg
24KB, 496x306px
>>58324193
I suppose they're bashing on the phone.
>>
>>58321980
Ken M has been listening to too much JRE
>>
>>58313125
Its a recurring problem with elitist programmers from the old days. They think they're smart by doing a compilers work worse than the compiler would, by overengineering the simplest of problems.
Then they lose their jobs because they are inefficient and lurk here all day telling the kids that they do everything wrong by not overengineering.
>>
>>58323950
i prefer androids appointment
>>
>>58314869
no, thats an AR-15
>>
File: 1481755372375.jpg (43KB, 400x400px) Image search: [Google]
1481755372375.jpg
43KB, 400x400px
>>58312608
>>
>>58318197
>>58317885
No, it happens if you have Accessibility on and hold control and scroll too much. It zooms too far and the average Joe might not realise what they just did
>>
File: 1388386695122.jpg (313KB, 463x2880px) Image search: [Google]
1388386695122.jpg
313KB, 463x2880px
>>
File: 2fast.png (389KB, 944x942px) Image search: [Google]
2fast.png
389KB, 944x942px
>>58323607
Remember add watercooling for your storage too.
>>
File: red.jpg (31KB, 342x143px) Image search: [Google]
red.jpg
31KB, 342x143px
>>
>>58312688
Just cut off the sign bit
>>
>>58312608
>However, it is important to note the following exception to this rule: You should use an apostrophe only with the singular form of names ending in unpronounced s (see p. 97 in the Publication Manual). Therefore, if you were writing a paper about the philosopher Descartes, to form the possessive with his name, you would need to just add an apostrophe (e.g., Descartes’ theory).
what the fuck
that is the most backwards thing I've seen in a month, if anything I would think that would be the one where you should definitely put an 's at the end
whatever, I'm still going to do it for everything
>>
>>58324395

Does he have any idea how many chemicals are in that motherboard? Literally frying your food in carcinogens.
>>
>>58323423
I'd be interested to see an application where this it the best possible solution
>>
>>58308537
is it the same one that's on /k/?
>>
>>58324493
Thank you for your contribution to the degradation of the English language. Spellcheck programmers everywhere will rue the day they pissed you off with those gosh-darn grammar rules.
>>
>>58324395
That's awesome
>>
File: maximumkek.png (122KB, 700x1787px) Image search: [Google]
maximumkek.png
122KB, 700x1787px
>>58310927
>>58312113
>>58312389
>>58312412
>>58313939
BEHOLD: The true masculine max function
>>
>>58322340
yes, they let the male managers design it
>>
>>58312777
why?
>>
>>58322340
Fuck. Now that I think about it... It might actually be this
>>
>>58312815
>draining entropy
it's OK guys, we answered the question, now Multivac can get to making us robot waifus
>>
>>58312178
probably her conservative dad's gun
>>
>>58312777
I don't see what's wrong with this. Can someone explain?
>>
File: veil-nebula-10907-1920x1080.jpg (662KB, 1920x1080px) Image search: [Google]
veil-nebula-10907-1920x1080.jpg
662KB, 1920x1080px
>>58324395
kekekekekekekekek
>>
>>58322162
for something like a full year afterwards it would pester you every single time, and it got more and more aggressive by making the "I don't want to use my name" option harder to get to and wording it in weird ways
>>
>>58322223
>one off
>>58322222
>>
>>58311857
>liberals are weak, cowardly, backstabbing people
She's still alive
>>
>>58315721
>>
>>58318897
>not liking anime
degenerate
>>
>>58315639
Why does this make me depressed
>>
>>58325281
You have autism.
>>
>>58324592
dude I used to be a grammar nazi and then I learned not to give a fuck
I'm happy to see them agreeing with me on the "boss's" and "class's" problem but that exception is just fucking bonkers
>>
>>58314317
Please desist from posting poorly drawn Japanese comics
>>
>>58322031
Honestly that is probably more powerful than what is in most missiles. A lot of missles today are still using the best chips of the 80's
>>
>>58325046
Pointless typedef and assertion macro.
>>
>>58324395
Enjoy your heavy metal poisoning
>>
>>58326106
Enjoy your down syndrome.
>>
>>58326166
I will, thank you.
>>
>>58316854
The example is 100% correct. Please learn the language before you comment on it, thanks.
>>
>>58322342
>>58323242
Actually final and actually working edition
http://pastebin.com/E5DQH0zb
The averaging method I used is patented by samsung, pls don't report me.

Here's some results I get
Averaged results:
Trivial realtime:99947160 ns, Trivial clocktime:239592703 ticks
Expert realtime:127277805 ns, Expert clocktime:316115670 ticks
Average time per function:
Trivial nanoseconds=0.372332, trivial ticks=0.892552
Expert nanoseconds=0.474147, expert ticks=1.17762
>>
>>58312282
>they assign the pointer to the address of the first element of the array
lol, no, they assign the pointer to the address of the array
>>
>>58326676

I got similar results.

Averaged results:
Trivial realtime:62184875 ns, Trivial clocktime:255674313 ticks
Expert realtime:101262365 ns, Expert clocktime:372711693 ticks
Average time per function:
Trivial nanoseconds=0.231657, trivial ticks=0.952461
Expert nanoseconds=0.377232, expert ticks=1.38846
>>
>>58314220
I (sadly) don't know much about encryption, could someone explain what's so wrong here?
>>
>>58327125
it's not encryption, it's a reversible hash function
>>
>>58327125
base64 is an encoding scheme. Its like converting a decimal number into hex and saying its encrypted.

Encryption combines a plaintext and a key into a ciphertext that is irreversible without knowing the key.
>>
>>58311857
Is that a FAMAS?
>>
>>58312081
lol
>>
>>58313043
Fewer instruction does not necessarily make a routine faster. Conditional move is pretty fast on modern processors though, so that path should be faster.

>>58313070
conditional move is still technically a branch. It's just faster because the branch doesn't need to be predicted to pipeline.
>>
File: 1483406868722.png (195KB, 380x444px) Image search: [Google]
1483406868722.png
195KB, 380x444px
>>58317535
>using msvc
>>
>>58308097
HumanLanguage.words.responses.acronyms.lol.alternative.kek();
>>
>>58324396
yup, they will throttle under heavy loads if they heat up
>>
>>58312590

cri evytim
>>
>>58323423
>>58324512
It's not USB you idiot, it just uses the USB 3.1 port and cable for PCI-E
>>
>>58322852
>>58322852
>>58322852

Fucking Southbridges. I have Personally done that and consider it a legit fix.
>>
>>58323235
holy shit this works
>>
>>58315607
what's funny? they reuse a box
why would I want to pay a few bucks more for a product because of the box?
>>
>>58313077
that's what you get for using only keyboard shortcuts
>>
>>58328619
le 3.5GB meme
>>
File: reasonlogic.jpg (102KB, 625x697px) Image search: [Google]
reasonlogic.jpg
102KB, 625x697px
heres one for /g/ and /mu/
>>
File: 1432744199368.jpg (98KB, 656x534px) Image search: [Google]
1432744199368.jpg
98KB, 656x534px
>>
File: broken macbook HDD cabling.jpg (104KB, 768x1024px) Image search: [Google]
broken macbook HDD cabling.jpg
104KB, 768x1024px
>>
>>
File: 1388198377065.jpg (51KB, 477x395px) Image search: [Google]
1388198377065.jpg
51KB, 477x395px
>>
>>58329905
Not funny. Unless you're a 16 year old who doesn't know shit about floppies.
>>
File: 1460073339256.jpg (188KB, 689x609px) Image search: [Google]
1460073339256.jpg
188KB, 689x609px
>>
File: 1450823479055.jpg (2MB, 3264x2448px) Image search: [Google]
1450823479055.jpg
2MB, 3264x2448px
>>
>>58313077
What happened to Mr. Linux man?
>>
>>58330641
Mr.GNU you faggot!!! fucking newfags
>>
>>58307342
I don't get it.
>>
>>58314869
It's missing surrender sticks. It has to be the gun from heat.
>>
>>58328619
The joke is Nvidia sold 970s advertised as 4gb VRAM but only had effectively 3.5gb, while AMD sold legit 8gb cards (just needed firmware update or something) in boxes remarked to 4gb.
>>
>>58327125
it's a common and simple way of encoding information and it's fairly easy to tell when it's encoded that way, so it's very easy to crack compared to a proper encryption algorithm
>>
File: 1411973082863.jpg (73KB, 1024x768px) Image search: [Google]
1411973082863.jpg
73KB, 1024x768px
>>58323927
>>
>>58330986
wtf I want AMD now
Thread posts: 327
Thread images: 109


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