egg|nomz|egg changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer.
<kmath>
<bofh453> @stephentyrone @chordbug OH SPEAKING OF AWFUL PHYSICS NOTATION: ⏎ "Another way to write the d'Alembertian in standard… https://t.co/ugvyjSqsMh
<kmath>
<derekhennen> Need more millipedes in your life? (Obviously, yes.) I started a Twitter dedicated solely to millipedes! Please fol… https://t.co/Evi1qs8kMq
<egg>
bofh: yeah, I tried using that on the MMP lecture notes I wrote with klickverbot@, and he correctly pointed out that nobody is going to know what this stupid symbol is
<awang>
godbolt seems to be allocating registers a bit smarter than my compiler
<awang>
But besides register names used, everything seems to be about right
<awang>
My compiler saved 5 registers instead of 4
<awang>
Not really sure why
<bofh>
Iskierka: so I've *personally* hand-desoldered/hand-resoldered Capacitor Plague from socket 370 motherboards... one of them still runs to this day.
<bofh>
awang: this doesn't seem *too* bad as generated asm for that code, which means that it's above my level of compiler knowledge prolly.
<awang>
I'm mostly wondering about the "call qword ptr [rax + 8]
<awang>
Because the code seemed to be reloading the vtable every iteration
<awang>
So I was wondering if there was something that could actually cause the vtable pointer to change between iterations
<awang>
I guess some of the spills/reloads are kind of questionable, too
<awang>
Like the spill to xmm1, followed immediately by a load of the same address to xmm0
<bofh>
yeah okay wtf is that spill
<bofh>
even more weirdly apparently that maps to #include <array>? what the shit?
<kmath>
<msdevindia> Want to prank your developer friend? Replace a semi-colon (;) with a greek question mark (;) in their C# code! http://t.co/iHTueu4HxP
<awang>
"coming across such code" -> "coming across code that results in a vtable reload every iteration"?
<egg>
!wpn iximeow
* Qboid
gives iximeow a rhodium gasket
<egg>
!seen whitequark
<Qboid>
egg: I last saw whitequark on [23.02.2018 17:49:34] in #kspacademia saying: "those can pinch your fucking finger off"
<iximeow>
hurm
<iximeow>
so here's my tired and fairly c++-uninformed argument, awang:
<iximeow>
GetLocalValue is a virtual call so something could subtype Quad and *only* reimplement that
<awang>
That can't happen in the middle of the loop though, right?
<iximeow>
i'm not sure why-- yeah
<awang>
Hmmm
<iximeow>
i also don't understand the difference between LBB2_3 and LBB2_3
<awang>
iximeow: The compiler hoisted the if (local == 0) check outside of the loop
<awang>
so one loop is hardcoded to do nodes[i]->GetX()
<awang>
And the other nodes[i]->GetY()
<awang>
Or at least that's my interpretation
<iximeow>
that was my thought as well but the calls are the same
<iximeow>
the only difference is how rdx is populated
<awang>
Hm
<awang>
You're right
<awang>
They were different when disassembled locally
<iximeow>
LBB2_4 the compiler clears edx, LBB2_3 it assigns edx=r15d, BUT
<awang>
Oh wait
<iximeow>
you could remove the test, conditional branch, and always `mov edx, r15d`, entirely discard the second branch, and it should be functionally equivalent
<egg>
what if the functions have evil side-effects
<awang>
egg: if only C++ had a way to indicate pure functions :(
<iximeow>
oh, there's another difference
<iximeow>
line 27/line 49
<awang>
egg: Maybe I should start spamming [[gnu::pure]] or [[gnu::const]] everywhere
<awang>
iximeow: movsd, xmm0, qword ptr [rax]
<awang>
Or [rax + 8]
<awang>
?
<awang>
If rbx is the start of the nodes vector and rbp is the index
<awang>
that is
<iximeow>
yeah, though they're [rcx] and [rcx + 8] for me..
<iximeow>
i was just puzzling over what rbx is
<iximeow>
nvm missed the `mov rbx, rdi`
<awang>
Ah, yes
<awang>
Apparently messing with the pure/const attributes caused register allocation to come out differently
<awang>
Right, so the call to the same address makes sense
<awang>
I got the call mixed up with the GetX()/GetY() calls
<awang>
Which were inlined, apparently
<iximeow>
yeah, the call qword ptr [rbx + 32] is GetLocalValue
<iximeow>
s/rbx \+ 32/rax + 8/
<Qboid>
iximeow meant to say: yeah, the call qword ptr [rax + 8] is GetLocalValue
<awang>
iximeow: Apparently the reason the vtable pointer has to be reloaded is because of placement new
<awang>
bofh: ^
<bofh>
placement new?
<awang>
bofh: Construct an object in already allocated memory
<kmath>
<jckarter> $ cc -Wint-conversion foo.c ⏎ foo.c:10:4: theres actually zero difference between signed & unsigned things. you imbecile. you fucking moron
UmbralRaptor has joined #kspacademia
UmbralRaptor is now known as Guest51828
UmbralRaptop has quit [Ping timeout: 207 seconds]
Guest51828 has quit [Client Quit]
UmbralRaptop has joined #kspacademia
UmbralRaptor has joined #kspacademia
UmbralRaptor is now known as Guest51582
UmbralRaptop has quit [Ping timeout: 383 seconds]
Stratege__ has joined #kspacademia
Stratege_ has quit [Ping timeout: 198 seconds]
<egg>
!wpn awang
* Qboid
gives awang a Norgg/infinity hybrid
<egg>
!wpn bofh
* Qboid
gives bofh a barrelling ink bottle
<bofh>
!wpn egg
* Qboid
gives egg a radium kitten
<egg>
should I pet the kitten
<iximeow>
!wpn egg's kitten
* Qboid
gives egg's kitten a relational tangent delegate with a speech continuum attachment
<Guest51582>
egg: pet the kitten with waldos?
Guest51582 is now known as UmbralRaptor
* egg
pets UmbralRaptor
* UmbralRaptor
purrs.
<soundnfury>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor an invertible heptode
<UmbralRaptor>
!wpn soundnfury
* Qboid
gives soundnfury a frangible Van Allen wrench which strongly resembles a delegate
<soundnfury>
a 'frangible wrench' sounds less than entirely useful...
<soundnfury>
maybe it's like a torque screwdriver, but a bit more 'final' if you overdo it?
<UmbralRaptor>
Presumably.
<UmbralRaptor>
Also, a Van Allen wrench might be a bit radioactive.
<soundnfury>
but it protects the nut you're tightening from radiation, so, v0v
<UmbralRaptor>
hrm
<UmbralRaptor>
!wpn
* Qboid
gives UmbralRaptor a molybdenum ignition-like scalar
<egg>
!seen котя
<Qboid>
egg: I haven't seen the user котя yet.
<UmbralRaptor>
Surely it would be kotya, given the limited characters available for nicks?