« first day (1026 days earlier)      last day (3928 days later) » 

6:00 PM
@BartekBanachewicz As in about 50% of the time? :)
 
o btw mysticial
if I iterate through a linked list, will the list still be stored in cache?
 
@Fanael memory profilers tell you this....? o_O i don't think Heapy does :<
 
@Fanael I know you think I am totally dumb, but I know how a profiler works. Any names?
 
@DeadMG depends on how big it is and where the nodes are.
 
hrmmm
 
user784668
6:00 PM
@EiyrioüvonKauyf low-level CPU profilers, like AMD CodeAnalyst or whatever the Intel's equivalent is /cc @BartekBanachewicz
 
let's say 100k nodes, but each node isn't very large.
 
oh i see i don't use those :| in general
 
and I just allocated them straight from the heap.
 
@DeadMG If your nodes happen to be in shitty places, then you're get shitty performance.
 
I could use an arena buffer to allocate them
 
6:01 PM
@DeadMG That's might not even fit into CPU cache.
100k nodes assuming two 8-byte pointers + data per node + allocation overhead.
 
@Fanael VTune.
 
hmm
try two 4-byte pointers
 
user784668
@BartekBanachewicz maybe, I don't know nor care
 
i thought that it might require something specialized
 
@DeadMG I think the biggest part will be the allocation overhead.
 
6:03 PM
and I can set allocation overhead to virtually zero
 
I don't know how much extra shit each compiler slaps onto each allocation.
 
since I know in advance how many nodes I need (about 100k) and how big they are.
 
user784668
@BartekBanachewicz @EiyrioüvonKauyf Or valgrind, if you can live with the overhead.
 
@DeadMG ah
So they're allocated contiguously?
 
user1804599
Yay.
 
6:03 PM
@Fanael yes i use that more often. i need to look at the options for that. and the overhead is a pain T_T but something to live with
 
I can make that happen
 
user1804599
Short-hand lambda syntax workz!
 
can someone explain why cin.get() does not go in and get a character at time ? but instead prints the whole line after i press enter ? thanks.
 
@DeadMG So it's a linked list, that jumps between elements of an array?
 
user784668
@EiyrioüvonKauyf valgrind --tool=cachegrind ./foo
 
6:04 PM
yeah
 
user1804599
@AmberRoxanna Line buffering. See the five hundred billion dupes on Stack Overflow.
 
but I might be looking at iterating through it many, many times
 
@DeadMG 100k * 8 bytes + data = ...
 
user784668
@Mysticial so I should look into it?
 
the data is the structure
 
6:05 PM
@Fanael dam i was just looking at that interesting :3
 
Assuming data is small, it'll fit into the highest level cache.
 
I only have like, 1 byte of data per node
 
So if even in the worse case, each linkedlist hop will be an L3 hit ~ 50 cycles.
 
oh, plus a vptr
 
@not-rightfold lol, sorry to ask. I keep rushing to the chat room.
 
6:06 PM
well, in principle, the list should get shorter every iteration
 
user1804599
let subscript = &1[&2] in subscript([1, 2, 3], 1) yields 2. :D
 
@Fanael have you used Massif?
 
@Fanael Looking at the raw numbers, assuming L1 hit is 1 cycle and memory is 200 cycles, that's 50% of the time in cache misses. Though I'm not sure how much of it is overlapped. It might be worth looking at it, if the computation isn't compute bound.
 
user784668
@EiyrioüvonKauyf yes, once
 
user784668
@EiyrioüvonKauyf most of the time, I use callgrind and cachegrind
 
6:07 PM
k
 
user784668
Hm.
 
user784668
Most of the cache misses are in memcpy.
 
@Mysticial I thought that L3 cache was a few MB on a modern chip
 
user784668
Wait.
 
@Fanael It gets tricky too. Because the memory comes in cacheline blocks. So if you access multiple elements on the same cacheline, do they all count as separate cache misses? So there's an unknown multiplier effect which you may need to check up on.
 
user784668
6:08 PM
I have suspicions that most of the misses are caused by later cleanup.
 
@DeadMG Correct. So it will fit in the L3 which is ~50 cycles on most processors. It's memory that becomes 200.
L2 tends be ~20 cycles IIRC.
 
user784668
@Mysticial Yeah, I know.
 
L1 is 1 cycle.
 
hmm
 
time to play guitar
 
6:10 PM
apparently, I have 256KB of L2 on this chip
 
I was slacking off.
 
@Fanael Another thing is, hardware prefetching never happens across page boundaries. So you will always get a cache miss accessing an uncached page for the first time.
 
@R.MartinhoFernandes Surprisingly deep.
 
@EtiennedeMartel yesss i can finally see one :3
 
Though I can't say I've ever had problems with prefetching across page boundaries. I usually prefer to just get rid of memory accesses as a solution to reducing cache misses.
 
user1804599
6:13 PM
You know.
 
user1804599
Gear doesn't need ==. Just define a function named eq and use it with infix notation.
 
user1804599
Put everything in the library!
 
IOW, I prefer to change the algorithm so that I don't have cache misses in the first place - rather than hacking around with prefetch solutions.
 
user784668
So vast majority of the misses are because I traverse a friggin' trie every time I insert something.
 
lol
 
Xeo
6:17 PM
@EtiennedeMartel "close enough"
@not-rightfold Just add user-defined operator support with implicit infix notation!
 
@Xeo The suave voice helps.
 
@Mysticial this... what is this called. where do i learn about optimizing cache misses
 
user1804599
@Xeo Gear 2. :P
 
@EiyrioüvonKauyf The hard way. By trial and error.
When I first started this type of programming, I knew nothing of this stuff.
 
class. is there a related class? well how did you find out?. would this fall under computer architecture because then i have to read the stupid giant book i have T_T
 
user1804599
6:19 PM
Till then, use let eq = fn x y { match x { ^y { true } _ { false } } } and ~:eq:~. :P
 
@EiyrioüvonKauyf A class on basic computer architecture will definitely do it.
The basics at least.
Though they tend to do mostly CPU stuff rather than memory.
So you'll learn stuff like OOE and branch prediction. But not necessarily memory, cache coherence and parallel stuff.
 
:|
ueh ok reading the book it is
 
user784668
ahahahahahahaha
 
classes are very slow -.-
 
user784668
84.5% of indirect branches are mispredicted ♥
 
6:22 PM
But I will warn that learning about computer architecture and utilizing it to write fast programs is different.
 
@Fanael oh that's brilliant <3
 
There are very few classes which actually teach how to write fast programs beyond the basic algorithms stuff.
 
user784668
Branches:        322,846,539  (310,757,830 cond +  12,088,709 ind)
Mispredicts:      21,414,896  ( 11,192,738 cond +  10,222,158 ind)
 
@Mysticial :| well that's not nice
 
@Fanael lol
 
user784668
6:23 PM
@Mysticial more like, a lexer than a lol
 
Oh and in case anyone wants to rape/troll/vilify/beat me up I think Ada Lovelace & Alan Turing should be on next banknote. Computer pioneers
 
basic algorithms ... you mean like optimizing after complexity classes aren't taught?
 
@EiyrioüvonKauyf It isn't. My grad school is one of the bigger HPC centers in the world. They didn't have a class on how performance-oriented programming. (aside from algorithms)
@EiyrioüvonKauyf Those are taught. But that's it.
 
user784668
@Mysticial 97.91% of all mispredicted indirect branches are in config::Lexer::nextToken
 
oh i could have gone to UIUC
 
6:24 PM
You get your big-O optimal algorithm... now what?
 
did you like it?
 
So you use a hash set and you get 100% cache misses... MUAHAHAHAHAHA FAIL
But it's O(1).
 
user784668
@Mysticial O(n) worst
 
why :c
O(2^n * nlog n) is best
sorry
i mean O(2^n n^r) for some r
<3
 
6:27 PM
damn, I file like shit on guitar
 
user1804599
O(static_cast<int>(!static_cast<bool>(n))) is best.
 
Some of the more advanced classes will teach parallel programming theory and how you sometimes need to use slower algorithms that scale better.
 
I can play something, but I feel like my instrument is looking at me and saying "what a noob"
 
user784668
@Mysticial using 20 for L2 hit cost, 200 for RAM access and 20 for branch misprediction, most stalling is actually indirect branches in the lexer, lol
 
But again it's another algorithms class.
@Fanael lol
This is why I don't do parsing. Because it sucks.
:)
 
6:28 PM
@Mysticial :| hmm i know an example of this i can't think of one orz
 
FWIW, I do it in a bunch of places in my pi-program.
Algorithms that are sub-optimal (for 1 thread), but scale the best.
 
algorithms suck
 
user1804599
@BartekBanachewicz boolshit
 
i want someone else to care about performance for me
 
user784668
@Mysticial I'm actually surprised how CPU-friendly this code is, given it's a quick and dirty stuff that I intended to replace ASAP and not optimized at all
 
6:30 PM
i just want to get shit sorted
 
user1804599
Optimizing sucks, not algorithms.
 
@not-rightfold theory is always nice and neat
 
user1804599
Gear uses a sorting algorithm in its pattern matching.
 
user784668
@Mysticial I expected otter crap with 30% cache hit and 10% branch prediction ratio
 
@Fanael There's different way to look at it. If you're spending little time stalling on cache misses, that could also mean that the CPU code is so bad that the cache misses don't matter. :P
 
user1804599
6:32 PM
In Python I'd use a set and == instead, but not in JavaScript because JavaScript sucks.
 
@Mysticial how do you optimize cpu caching + predictions etc, when you're looking at scale? anything special?
 
@BartekBanachewicz I scrapped it and am trying to redesign, but I seem to be remaking it :\
 
user784668
@EiyrioüvonKauyf first rule of optimization: code that doesn't exist is the fastest
 
user784668
@EiyrioüvonKauyf so if you miss the caches, don't access memory. If you mispredict branches, don't branch
 
@Pawnguy7 good
 
6:34 PM
@EiyrioüvonKauyf I usually separate the low-level CPU stuff from the high-level memory stuff.
Since they are mostly independent.
 
so like how do you optimize code when working with hadoop?
 
user784668
I actually have an idea how to get rid of the lexer altogether.
 
user1804599
Use Parsec, you fools.
 
Scaling is most directly related with high-level stuff like memory.
 
user784668
No lexer means no big switch, which means no branch mispredicts.
 
6:35 PM
@BartekBanachewicz how so?
 
@EiyrioüvonKauyf I've never used hadoop. But the point is, low-level and high-level optimization are independent from each other. You can optimize each to however extent you want without much affect on each other.
 
user1804599
@EiyrioüvonKauyf lolhadoop
 
The # of cache misses I get isn't gonna be much affected by how many branch mispredictions I have.
 
user784668
@not-rightfold how about no
 
Or how much I unrolled that loop.
 
6:36 PM
kk
 
user784668
@Mysticial uh-oh, fail, I$
 
@Pawnguy7 ah, remaking like again the same thing
eh
 
user1804599
Writing a parser without monads is like stabbing yourself in the glans.
 
did you dig up my thoughts about that?
 
It can matter in the cases the low-level code is so fast that you get more cache misses because the memory can't keep up.
 
6:36 PM
@not-rightfold Spirit
 
But from an optimization stand-point they're independent. You're just exposing different bottlenecks when one thing becomes faster.
 
user1804599
@BartekBanachewicz Compiler will surely deliver, let's just wait.
 
@not-rightfold teehee
 
Alright, I'm gonna create my docking library, and I'm gonna call it Harbor.
I'm gonna put that somewhere on my todo list.
Which is ridiculously large because we are understaffed.
 
user1804599
Just make sure you don't finish it.
 
6:38 PM
Anyone looking for a job?
 
@EtiennedeMartel tags?
 
We need more tool programmers.
 
user1804599
As in programmers that listen to music by Tool?
 
@BartekBanachewicz I am confused
 
@EtiennedeMartel meh.
I mean working with you could be totally cool and stuff but I still consider tooling... well, boring.
@Pawnguy7 I have layed out a skeleton of new design for you here. it's in the transcript
 
user1804599
6:40 PM
Tooling is fun.
 
@BartekBanachewicz Was I here when you linked it?
 
I am a graphics guy.
@Pawnguy7 I literally wrote it here
and yeah fuck you were here
 
user784668
@Mysticial: thank you for reminding me of these things I forgot because of dealing with architectures with no cache and no pipelines
 
np
 
user784668
Now reading about lexerless parsing.
 
6:44 PM
damn noone to play LoL with
 
@BartekBanachewicz Oh. Did I mention I suck at looking through the transcript?
 
user1804599
@Pawnguy7 Use the search functionality! Oh wait, that also sucks at looking through the transcript.
 
@EtiennedeMartel they're trying hard, but it's still a terrible situation. And they won't really make any real progress anyway because most of people that play this game are fucking retards
 
@BartekBanachewicz I'd like to know where you pulled those stats from. That better not be your rectum.
 
6:46 PM
@EtiennedeMartel I have been playing this game a little longer than you. Call that personal experience + 10k tribunal score + reading
 
@BartekBanachewicz So, anecdotes?
Yeah, that's scientific alright.
 
okey sure, you're totally right.
 
@EtiennedeMartel lol'd
 
@BartekBanachewicz I hope you understand now that using hyperboles in front of me is a bad idea.
 
The last sentence is gold too.
I almost thought this was p4rgaming
 
6:49 PM
Sigh. All I found was the messages telling me you wrote it 8 minutes ago haha.
 
@EtiennedeMartel I don't know, I think that you linking article about honor system which is already broken and nobody uses it is bullshit too, because you just don't play the game enough. But sure, you win.
I made a fallacy therefore I must be wrong.
 
@EtiennedeMartel Oh god yes, I love that they're really trying to fix the situation
 
@BartekBanachewicz You just said nobody. I use it, so your statement is false.
 
user784668
@Mysticial the funniest thing: after initialization, the program sits 99.99% of the time in GetMessageW
 
@BartekBanachewicz I used the honor system
hell, I used the tribunal all summer last year
 
6:50 PM
@EtiennedeMartel the fact it's used by the retards on "honor pls" basis is irrelevant. Pretty much noone uses that in solo ranked queues, where it really matters
 
Also, you just pulled the "I play it more than you" card, which is even more bullshitty.
@BartekBanachewicz Got numbers to back that?
 
do you even have lvl 30 already?
 
@BartekBanachewicz Sure.
I don't see how that is relevant.
 
@EtiennedeMartel have you played solo ranked?
 
6:51 PM
then you must have amazing data to back that up
 
You're still just extrapolating your own personnal experiences and somehow deriving "facts" from that.
Notice how I'm not giving any argument.
 
Personal? I have friends in Diamond, Platinum, Gold and Silver leagues
 
I'm just deconstructing what you're saying.
 
they all pretty much agree on that.
 
@BartekBanachewicz Since when does solo ranked provide the only relevant data? id be willing to bet a m majority of people don't play solo ranked.
 
6:51 PM
@BartekBanachewicz was it a ping?
 
I'm watching you dig yourself deeper.
I'm pointing out the points in your arguments that are flawed.
Do you think I have any interest in participating in a discussion without having enough data?
 
2 mins ago, by Bartek Banachewicz
I made a fallacy therefore I must be wrong.
 
@EtiennedeMartel The really good thing about Riot here isn't what they've done about the problem, it's that they acknowledge that they have a real problem and they're trying to solve it. This is much better than many game companies have done.
 
user784668
@Mysticial so clearly I should optimize GetMessageW instead :P
 
@EtiennedeMartel yeah, sure, you are totally right.
 
6:52 PM
I don't know if what they're doing is working. I don't know if the honor system is a good solution to the toxicity problem.
 
@Fanael ahahaha
 
@DeadMG It's sugar coated (if you read all of it)
 
I don't know anything about that. But I'm not claiming I do just by pulling some random anecdotes out of my ass.
 
I won't even try to argue about that because I went in too many discussions with people who play Normal mode.
 
As such, the burden of proof is not on my shoulders because I'm not trying to prove anything.
I just said: "toxicity is an issue, they're working on it, it's cool".
 
6:54 PM
And Normal mode is a whole different game I am not concerned about.
 
And then you went and slapped bullshit on that.
 
It's one thing to work on it, it's another thing if it works.
 
@Rapptz I did read all of it and I am unsure what you mean.
 
@Rapptz and I already said I appreciate them trying
 
@BartekBanachewicz have an idea how long ago it was?
 
6:55 PM
@EtiennedeMartel and I tried to state my opinion on that, but apparently without "scientific data" you won't listen, so I'll just shut up
@Pawnguy7 no more than a few (2-3) weeks ago
 
> "The average player in the game is not toxic or positive, they're neutral," Lin says. Because the Honor system allows players to praise other players for their actions "we're able to nudge them a little toward the positive."
 
@BartekBanachewicz I will not listen to unsubstantiated opinions because the subject is incredibly loaded.
 
user784668
See ya guise.
 
So you're not bringing anything interesting to the debate by just stating that you remember things in a specific way.
 
@EtiennedeMartel me and people I know that play too. But then again, neither of them plays/is concerned with Normal mode.
 
6:56 PM
@BartekBanachewicz I don't see how your strangely elitist stance is relevant.
 
@not-rightfold Who the fuck told you JavaScript lacks let bindings?
 
If we were talking about game balance, sure.
 
What are you going on about?
 
user1804599
@ShuklaSannidhya They're not the same thing.
 
@EtiennedeMartel there's nothing strange about saying that the ranked games are different.
 
user1804599
6:57 PM
let in JavaScript introduces a block-local variable.
 
user1804599
It's not an expression like in Haskell and Gear.
 
@ShuklaSannidhya they are not proper let bindings
 
@not-rightfold or statement-local variables.
 
@ShuklaSannidhya which is still far from let bindings
 
@BartekBanachewicz That's not what I said and you know it.
 
6:58 PM
@EtiennedeMartel so let's settle on "It's cool that Riot is trying", aight?
 

« first day (1026 days earlier)      last day (3928 days later) »