« first day (2392 days earlier)      last day (2782 days later) » 
01:00 - 19:0019:00 - 00:00

19:00
so i was talking to a guy while looking for a job..
and i said "i have some experience optimizing for the CPU"
and he replied "well what's there to it? sse mmx? any compiler can do it today"
@iksemyonov sounds about right
comments? ideas? i really feel certain that there's a lot more to it.. memory caches pipelines as well as hand-written intrinsics sometimes
mean, ok, the simplest project that we had, multiplying dense matrices, took me about 2 months and it was still slower than MKL and only 80% of the hardware FLOPS
and most students only went for 50% or less of the peak perf
@fredoverflow what would you say?
nwp
nwp
in an ideal world you would not optimize a program, you would teach the compiler to do the optimization for you, and I could benefit from it without knowing it is there
@iksemyonov lol "sse mmx"
@milleniumbug why lol exactly, i need the arguments
19:05
@iksemyonov I would say compilers these days are smarter than probably 98% of programmers. Maybe you are in the last 2%, I don't know.
@nwp i bet there are problems that can not be circumvented that way
@iksemyonov mentioning a 1997 instruction set (MMX) in the context of modern optimizing techniques for modern CPUs
@fredoverflow well, i'm positive that there are a ton of articles on matrix mult., using CPU, but that may be dubbed an algorithmic optimization
nwp
nwp
@iksemyonov one of those problems is compile times, but generally it is still the right thing to do
@nwp what would you say about "optimization for GPU"? it appears from time to time in job postings
nwp
nwp
19:10
@iksemyonov I would say let CUDA do it, but I don't know what I'm talking about.
@nwp the first thing that comes to my mind is the same as CPU: memory access, which is notably harder to build correctly on the GPU (more levels, more cores)
@fredoverflow also the "Agner Fog's CPU Optimization Manual" comes to mind: it has to exist for a reason
nwp
nwp
in my ideal world you write your program precisely, in a way that all constraints on the output are present and nothing more, then the compiler does the rest
@iksemyonov Maybe the primary reason for the manual to exist is so that compiler writers can read it? ;)
@fredoverflow thinking about that too, but then why did they interview me for half an hour on the subject in a company doing computer vision.. no idea, honestly
nwp
nwp
unfortunately we are still far away from that, you can't even specify a general container
19:25
@Mysticial Well, I'm mostly outside to play Pokémon Go. I also happen to like watching plants, but I hardly ever go out just for that.
Out of sheer curiosity. Is there a way to figure out my first post here?
I sometimes wish I could cuddle myself just to see how I feel.
@Morwenn lol, that's pretty narcissistic.
@wilx Not a problem as long as you're single x)
And I'm far from liking myself enough to be an actual narcissistic ^^'
Happy Star Wars Day!
@wilx chat or so?
19:40
@Code-Apprentice This chat.
If you search your handle, you can find the first time you were mentioned. That is the closest my brain storming gets to a solution so far.
Our Prime Minister us total and utter moron.
@Mysticial like have devs making games for it?
20:06
@thecoshman Like almost 100 % backwards compatibility over quote a huge time frame.
Like HANDLE and WaitForMultipleObjects, despite its limitations.
Like APCs instead of signals.
@fredoverflow My experience is rather the opposite. Just writing the most obvious assembly (even doing things you know aren't optimum, but are easy) will beat the best compiler you can find about 98% of the time. Still rarely worth it, because it'll definitely take more work, and you'll only win by a small margin. Nonetheless, you don't have to learn assembly language very well at all to win essentially every time.
Like native threads before Linux had them.
Oh, a new sorting algorithm on arXiv.
@Morwenn New or "new"? Also, link?
@wilx It draws ides from the Ford-Johnson merge-insertion sort, but with a different strategy to insert elements in a sorted sequence. The overall idea isn't new (it's hard to find something actually new nowadays), but the specific technique seems interesting.
20:16
@JerryCoffin There's a number of compiler intrinsics which I can tell that the compiler devs (for both MSVC and GCC) spent approximately -127 hours implementing because they did it in the dumbest possible way. And that's assuming it works - which isn't always a good assumption. So in that case handwritten assembly wins even without trying.
@Mysticial Eh, that's sad. I always assumed that dedicated intrinsics where extra-tuned functions.
they're mostly just assembly instructions that don't totally fuck up the optimizer for the surrounding code, or are platform-agnostic versions
and even then, that's mostly because the optimizer doesn't have to be pessimistic about totally random shit you could do in assembly, rather than because it can optimize that thing well
@Morwenn Most of them are. Sometimes they get lazy.
Some intrinsics are genuinely hard to implement since they're context sensitive. (i.e. add-with-carry intrinsics) No compiler does those right - not even ICC.
Haha, I just realized I could implement a function named 1_2_insertion_sort with a UDL named _2_insertion_sort returning a function object x)
@Mysticial I mostly used the bit manipulation ones. I guess that these ones should be safe.
And the overflow-checking ones sometimes.
@Morwenn Most of the intrinsics that have no side-effects are genuinely safe. But there is one (large) exception that I'm aware of in MSVC.
20:23
Which is?
The FMA3 and FMA4 intrinsics on MSVC.
@wilx yeah... but is that a good thing?
GCC and ICC does them right. MSVC has a very lazy implementation.
@Mysticial Uh, that's strange for a function that's often assumed to provide better performance and not only better precision.
@thecoshman It is one of the things that allowed the users to use old apps on new Windows. It saved users a lot of money, IMHO. Yeah, I think it is a good thing in total.
20:25
@Morwenn Exactly. The issue is that the intrinsic takes 3 inputs and outputs one. But it maps to one of several instructions which take 3 inputs and outputs overwriting one of the 3 inputs.
@Mysticial What's wrong with them?
@wilx yeah, but it has it's cost. Maynot have been the best solution though
So you need logic to intelligently choose which operand to overwrite. (or reg-reg copy if you can't overwrite any of them)
@thecoshman I once read that Microsoft implemented a work around for a bug in original Sim City just because.
GCC and ICC have that logic and they make the optimal choice. MSVC only generates one of them and it always overwrites the same operand.
20:26
@wilx strange...
@thecoshman It gained them more then they invested into it, I would say.
@wilx Use-after-free
So if you need to overwrite a different operand, MSVC generates an extra instruction. Whereas GCC and ICC picks a different FMA instruction.
@Mysticial Oh, ok.
Ell
Ell
I need a german
2
20:27
@Mysticial This... doesn't really sound like a terrible terrible problem, just not-as-good performance
@wilx good for them sure
@Puppy Indeed, it's not a correctness issue. Those are generally rare - the last one I'm aware of is GCC 5.2 where they fucked up the add-with-carry instrinsics. Had a bug in the carry logic.
Except that FMA-heavy code suffers quite a bit with all those extra reg-reg moves.
@wilx When you start looking carefully, you realize the Windows has lots of extra "stuff" to work around bugs in lots of other code. Years ago (Win2K timeframe, if memory serves) somebody tried to make a scandal out of the fact that Windows explicitly detected a particular program (from a Microsoft competitor) and did some slower "stuff" if that's what was running.
In the end, it turned out the extra "stuff" was to cover for the bugs in that program, and kept it from crashing and destroying customer data.
@JerryCoffin Yeah. I remember seeing some data files related to that in Windows 95.
alright
I give up
20:36
thing is, it's all well and good MS helping customers not get fucked over by bad code, but it's not helping solve the problem of shit code
I finally purchased one single item of clothing.
it's merely been a decade since I left home
condom?
@thecoshman The real problem is that shit code isn't a problem at all.
@thecoshman lololol
@Puppy Ah, those were the days. Nowadays I have to buy married items of clothing...
20:41
lol
20:56
Waiting for someone at a coffee shop and because they're running late I'm almost finished writing a brainfuck interpreter in rust. Just [, ], and , left to implement ^^;
all glory to the Hypnotoad
Ell
Ell
@Aaron3468 [, ] are the hardest :O
21:35
Mikhail had some great comedy going with @Mikhail I also said I was needing a x86_64 Linux executable.
Mikhail: its an exe you just download it
@JerryCoffin Jerry, you like to buy those married items. It is an envy to some here.
I'm also thinking of adopting a family, wholesale
21:50
not worth it
@Aaron3468 [ and ] are close to as much work as everything else put together (though, admittedly, the others are so trivial that doesn't mean a whole lot). For bonus points, pre-scan for each matching bracket, so you can jump to them directly instead of scanning for them at run-time.
@Mikhail You can adopt an entire village in Nigeria for only a few bucks a day...
dayum
Like in the Heart of Darkness?
for some reason I've just started doing things recently
I must be sick or something
22:10
with all the weird shit that's been going with our 'sun' lately, I'm beginning to think our 'sun' isn't a sun at all
Interesting graph.
Triangles are cool.
user1804599
@StackedCrooked In C++ you can pick 0.
lol
I always think you're @milleniumbug
user1804599
XD
FOUR HOURS SINCE THE LAST MESSAGE? NOT ON MY WATCH.
Er, looks like that was a UI rendering bug. Nevermind then.
22:20
you can play with your time settings to confuse the chat, too
Ell
Ell
hehe
22:32
So, I've started a project with a vauge aim of de-googling my life... so like... if any y'all interested, gives shout
@thecoshman If you have ask, t -> If you have to ask
@Mikhail thanks
user1804599
23:08
@Ell I found a nice way to unify type and kind checker implementations without going full dependent types.
user1804599
Now to implement proper type inference.
user1804599
HKT literally for free.
Ell
Ell
23:31
I'll read tomorrow
Sounds interesting
25
Q: The [ghost-blog] is ghosting [ghost]

James DonnellyBack in 2013 I asked a question about ghost. That tag was subsequently removed and replaced with ghost-blog, a tag with 271 questions. It seems that in 2015 the ghost tag was recreated, and since then it has attracted 195 questions. ghost-blog Ghost is a minimalistic open source blogging pla...

Who you gonna call?
Pet chicken gets jealous when we feed other birds
@LucDanton Fox News? (apparently about youtube.com/watch?v=2zScNHutKjE though)
23:55
@sehe ghost-bloggers
01:00 - 19:0019:00 - 00:00

« first day (2392 days earlier)      last day (2782 days later) »