« first day (2168 days earlier)      last day (2791 days later) » 

Ven
12:00 PM
@StackedCrooked Oh, I do know I'm fat, I'm fat – I know it. (really really fat)
(I'm a big of Weird Al :P)
 
Dunno how my brain linked "exponential backoff" with Weird Al screaming "back off man!".
 
@slaphappy s/safety/liberty/, but yeah.
(Reducing the safety of others tends to affect their liberties, though; see example above)
 
@R.MartinhoFernandes There's a double negation
 
Also, how can you argue for "strict" usage of words while using words like "nuts" to mean testicles?
 
what's the proper term for african negroes? Afroafrican?
 
12:09 PM
I assume it was used in an informal setting.
 
etymonline.com/index.php?term=nut Those damn 1915 kids those days, not using the language strictly.
 
However, if a physician referred to a patients testicles as his nuts.. that would be kinda not "strict".
 
If you want to argue this position, you need to get your evidence from an etymology dictionary, not from a present day normal dictionary (dictionaries are descriptive, btw, so if your dictionary doesn't reflect common usage it just means it's outdated).
I guess you could use a dictionary of <some standardized dialect>, and rephrase your claim as "I speak <some standardized dialect>". Good for you, though. We out there in the world don't speak standardized dialects.
 
@R.MartinhoFernandes So, are you still doing C++?
 
@StackedCrooked no one 'does' C++, the merely exist with C++
 
12:21 PM
The fact that a switch on enum without a default case will trigger a compiler warning (=error) in case of a missing enumerator is a bit of a game changer. Suddenly switch is super great.
 
Xeo
switch is great!
 
@StackedCrooked what if you handle all values in the enum?
 
It suddenly becomes a viable means to implement a state machine using nested switches. Also, my to_string(enum) functions now complain if I add an enumerator without updating the to_string function.
@thecoshman Then the compiler will remain silent.
 
Then yes, yes that is good
really, you just want pattern matching
<3
@StackedCrooked good
though I do like the fact that java has .name() by default in enums
 
@thecoshman Great :D
@thecoshman and like that I can wrap an int without needing heap allocation.
:P
 
Ven
12:34 PM
LES BRAS NOUS EN TOMBENT : Très fier du résultat, Accenture vient de déposer un brevet pour une blockchain éditable… https://twitter.com/i/web/status/777949913745387520
lol
 
> blockchain éditable
French is fun.
 
Ven
no it's terrible
 
non
it's great
 
irta blockchain edible
 
I had 11 years of french classes and have used it only two or three times.
I also forgot most of it.
^ In case you wanted to know :)
 
Ven
12:43 PM
We got @Griwes to livecomment it
 
Also:
^ I'm gonna watch this one first.
 
Ven
watching this one right now. Is it good?
the sound is bad :(
 
indeed :(
 
Ven
It gets worse.
 
@StackedCrooked That's interesting. I guess you don't leave Flanders much?
 
12:49 PM
Not really.
 
why would he, he's so sexy
 
Also, English dominates. I did meet a few French people over the past few years and they all spoke English to me.
 
Ven
Fucking french idiots.
 
humanity doesn't need multiple languages
 
We only need southern american english :P
 
Ell
12:53 PM
I prefer English English
 
*glish is fine
 
Ven
A british guy feeling superior about his language. How surprising!
@StackedCrooked @Griwes really hated Bjarne's talk because as usual, he made it look like there were no issues at all with the proposals
 
Ell
@Ven I think most people prefer their native language
I wasn't feeling superior
 
@Ven in his mind there are no issues with proposals he agrees with
 
English English simply means English from England.
 
Ven
12:55 PM
@ratchetfreak you're doing it again
 
@JerryCoffin Would you say that wireless repeaters are part of OSI layer 1? Surely they are always configured to transfer from one particular node, so the frequency is not enough?
 
@Ven Bjarne is in a retrospective state of mind.
He achieved way beyond his original goals.
So of course he's happy.
 
Ven
@StackedCrooked you're being very nice to him when you put it that way. :P
TBH, I'd like to have operator., UFCS, modules and concepts (with checking ofc). Bu then... I don't plan to do anymore C++ in 2017.
 
Ell
@StackedCrooked exactly!
 
nwp
@Columbo repeaters I looked at all required the wifi password, so probably higher
 
Ell
@R.MartinhoFernandes Potteries :D
 
lol
(Is that actually yours?)
 
Ell
Well, not really
It is what I'm surrounded by but I've been brought up intentionally without it because it doesn't do well in job interviews :L
But I have bits of it I guess
 
Ah, but it is your area. Awesome. I thought you just picked it cause of your name.
 
Ell
@R.MartinhoFernandes oh haha yeah I didn't even think about that
It is my area yes
I don't pronounce "book" and "cook" like a stokie would
I can't decide whether I like UFCS or not
@R.MartinhoFernandes if I could choose one I'd choose received pronunciation
 
Ven
1:17 PM
I wish I could implement interfaces after the classes were defined :[
inb4 "typeclasses", inb4 "structural typing"
 
nwp
As a software developer, two hands for facepalm is just not enough... — PlasmaHH 23 hours ago
 
@Ven "Les bras..." Yes please :D
 
Ven
@thecoshman LOL
 
hilarious
 
BOOBS
 
Ven
1:31 PM
@PatrickM'Bongo tu as vu le wall of tits de madmoizelle ?
 
le qui
 
Ven
@PatrickM'Bongo nsfw
 
> Tu dois être connectée sur le forum pour voir des boobs !
 
he he he
 
Ven
@PatrickM'Bongo osefosef and osefosef
 
2:00 PM
The slides for CppCon2016 are already available.
 
2:38 PM
pendant ce temps, à la culture
 
2:51 PM
@LucDanton Sortit tout droit de Des fists et des lettres.
 
@Aaron3468 Yeah. 2 weeks ago I ruled out hardware failure with the downclocking tests. The older versions not failing pushed me more in the direction of a bug in the code. And now I've found the line of code that's problematic, and it makes absolutely no sense from a software developer standpoint. Nor does it make sense from a UB standpoint.
I am aware that downclocking tests aren't sufficient to rule out hardware. But I didn't think that I'd actually be hitting such a case. For that matter, downclocking the memory would exacerbate row hammer effects since you increase the amount of time between refreshes.
When I get home tonight, I'm gonna run the row hammer test.
 
Ven
@Mysticial I've been following that drama for several days now. And I must say it's quite "amusing". Mostly it makes me realize how much I like my "high-level" C++.
 
@Columbo There is no clean correspondence between most wireless and the OSI model. A repeater is mostly layers 1 through 3, but typically includes (for only one obvious example) encryption/decryption, which is typically seen as being in layer 5 or 6.
 
Ven
(as they say, relativity and all that jazz)
 
package one of two for my Halloween costume has arrived :D
 
3:07 PM
@LucDanton lol
 
@LucDanton nice, antibes même
 
@Ven Yeah. Depending on how you look at it, it's both amusing and stressful.
Regardless of how this one resolves itself (if it even does), it goes in the books as the second biggest "road-block" I've ever encountered in software development.
 
@Mysticial Like unprotected sex!
 
I'll call it "road-block" instead of a bug, since it isn't necessarily a bug in the code.
 
@PatrickM'Bongo the best kind of sex o_o
 
3:10 PM
@StackedCrooked Indeed. I never realized the degree to which English dominated until I was on an Air France flight going into Germany, and saw a Russian guy talking to a flight attendant--and under the circumstances, his first (and really only) choice for the job was English...
 
But at this point, the best way for this to end is for me to confirm that it's a row hammer effect with memtest86. And fix it by manually increasing the refresh rate.
 
@JerryCoffin that reminds me how I was flying from Shanghai to Abu Dhabi and a flight attendant was from Dagestan (south of Russia)
 
Ven
@Mysticial I'm feeling your pain. I'm learning stuff. And most of all I'm thankful I'm not in your shoes.
 
@Aaron3468 Also. Maybe not quite a full circle. I did say I was gonna leave the row hammer hypothesis till later. Later is now.
 
@Abyx and
 
user1804599
3:15 PM
shit
 
@Ven Btw, it's possible to hit problem from something as high as Javascript running FireFox. It's just harder to do it unintentionally.
 
it's possible that only english, arabic, chinese and russian languages would survive. the latter three only because the countries are kinda isolated
 
user1804599
module type S = sig
  type t
  type config
  val create : config -> t
  val query : t -> Nnc_query.t -> unit -> Nnc_event.t list
end
 
user1804599
@Ven help
 
@Abyx unlikely at best
 
3:17 PM
@PatrickM'Bongo frogspeak eventually will die, as it's totally useless in EU
 
possibly
but having only 5 languages is unlikely at best
the level of uniformity and intercommunication required to get to that level is just no
 
user1804599
As long as Spanish and French don't become the world language, because those are ugly as hell.
 
@PatrickM'Bongo maybe some african tribes would keep their languages (and it would be French)
 
african tribes don't speak french
they speak their own dialects
 
can you imagine that? only some forgotten ex-colonies with pirates would speak French
would be funny as hell
 
3:20 PM
cyrillic as a language would probably survive
as it's the lingua franca of most terrorists
 
@PatrickM'Bongo nah, it's arabic
(and french in africa, lol)
 
even arabic is dozens of subdialects not necessarily mutually intelligible
 
@PatrickM'Bongo still it's the same language, with "llah" in each word
 
yes absolutely
 
@PatrickM'Bongo Cyrillic isn't a language, it's an alphabet (or perhaps a family of alphabets, but either way, related to alphabet not language).
 
3:25 PM
@JerryCoffin What you think it is bears no relevance to what it actually is
 
@PatrickM'Bongo Bears! Vodka! Russia!
inb4 sehe
 
@PatrickM'Bongo Sorry, but I'm still fresh and thinking clearly; if you want to troll me right now, it's going to take something a lot better than that.
 
Hello! How can i exclude files with a certain filename extension in my makefile? E.g. 'EXCLUDE := hpp swp' should be used to exclude files with *.hpp and *.swp?
 
@quiZ___ use cmake or better
 
@quiZ___ ostracize("*.hpp", "*.swp")
@Abyx "Cmake or better"? So you mean ninja?
 
3:35 PM
@JerryCoffin no, ninja is a backend
 
@Abyx I always like a nice back end. Especially in tight jeans. :-)
 
@JerryCoffin did you just catch a troll decease?
 
@Abyx A deceased troll? I believe that's a "rock". Better for throwing than catching, as a rule.
 
ok
 
Also: Hardcode the sizes of your objects and types so that you can avoid sizeof,which returns an unsigned result ;-) https://twitter.com/PatriceRoy1/status/778843924345475073
lol
 
3:40 PM
...or listening to. I definitely enjoy listening to rock. When I was single I wasted far too much money on a stereo, and immense amounts of time listening to it.
@Griwes I'd have thought James would know better. sizeof is an operator, not a function, so it doesn't return anything; it yields an unsigned result.
 
@JerryCoffin Feel free to engage in the twitter trollfest. :D
 
@JerryCoffin it can't be an operator - you cannot overload it
 
@Griwes How dare you assume that just because I'm an asinine moron that I'd stoop so far as to post on Twitter? Clearly asinine moron profiling happening here!
 
Ven
@rightfold I'm back.
 
@Abyx You mean like .?
 
Ven
3:46 PM
Sorry I was busy trying to convince a coworker than putting side-effects (store things in Redis, in this case) in a constructor you're going to inject later (DI) is Bad Idea™.
 
@JerryCoffin yay imagine how more fun standard terminology will be after introducing coroutines
 
@R.MartinhoFernandes I mean like :: because there is a proposal for operator.
 
@Abyx I make it a point to always write sizeof argument on cppreference and every week or two someone helpfully "fixes an error" to make it sizeof(argument)
9
 
Ven
@rightfold so what's your issue?
 
@Cubbi Same people who insist on return (value);, undoubtedly.
 
3:49 PM
@JerryCoffin still better than return bool_var ? true : false; for "explicitness"
 
also, I was pleased to see that operator co_await is overloadable
 
Ven
@JerryCoffin That's the rule we have at $school. I'd like to kill myself.
Okay, having to use C89 in general makes me want to throw up. But return (a); is an abomination.
 
@milleniumbug Looking at things, I guess I'm out of date. I am pretty sure the C standard used "yield", but looking in the C++ standard it currently (at least as of N4296) it mostly uses "the result is..." (though it does still use "yields" when talking about a sizeof... expression.
 
@JerryCoffin actually I think that "result of an expression" is a correct sentence
 
Ven
Clearly C++ just needs to get Perl's use feature 'coroutines'; :P.
 
3:52 PM
@Griwes I don't really understand all the hate for unsigned types. Since when did the committee start taking pages out of Java?
 
@Mysticial you cannot compare them with signed, easily at least
 
@Abyx It's (all too) easy to compare them. The problem is that the result can be surprising. :-)
 
That's not a problem I regularly encounter when I consistently use size_t. There's not a single signed integer in there.
 
@Abyx Obviously not. A correct sentence starts with a capital letter and ends with a period.
 
@Mysticial Chandler yesterday gleefully demonstrated how switching from uint32_t to int32_t massively optimized code that uses it as an index on a 64-bit CPU... even though using size_t would've done the same thing
 
3:55 PM
btw there was a video from GN 2013 or something about signed/unsigned
 
Ven
@Cubbi wtf
@Cubbi just why]
 
I can only thing of two (weak) arguments in favor of signed size types:
1. It allows the compiler to exploit UB wrap around for more optimizations. (can be either good or bad)
2. Decrementing loops to zero are prone to wrap at -1 if not you're not careful.
 
@Cubbi I've been telling people for years that it's a mistake to use explicitly sized types except where truly necessary. Maybe they'll start to listen (but probably not).
 
@Mysticial The primary time is for something like a struct that you're going to serialize by simply writing out the raw bytes, and expect somebody else to read them in and get the same stuff.
 
Ven
3:59 PM
I've never understood the problem with unsigned types in general, so...
 
On the other hand, there's a lot more I hate about signed types. Their representation isn't specified. So bitwise operations aren't fully defined. Wrap-around is UB even if it's intentional.
 
@Mysticial you don't need bitwise ops for a size
 
@Abyx Yes I do. Aligning pointers and size boundaries.
 
true, but they're defined for lower digits
 
Padding loop iterations up to certain alignments for SIMD or unrolling.
 
4:02 PM
anyways, C++ typesystem sucks
 
@Abyx Agreed.
 
user1804599
 
@Mysticial I would tend to agree that it's long past the time they should just bite the bullet, and limit signed integers to twos complement and be done with it. I know why they don't, but this is one of those places where Star Trek got it right: "the needs of the many outweigh the needs of the few".
 
whoah that’s radical thinking here, are you going to suggest UTF-8 chars next
 
Constrained ints would be better than uints
 
4:08 PM
@LucDanton Probably not--I'm not a big fan of UTF-8.
@Abyx I'd prefer unconstrained integers.
 
Someone proposed hardware support for checked integers. It's not a bad idea actually.
(assuming it can be implemented in hardware as efficiently as wrap-around arithmetic)
I'm not sure how expensive the fault handling logic is in processors. They obviously have it for all load-stores. And they have it for all floating-point instructions.
It might actually be a win if they nuke the ugly x86 carry-flag semantics and attach a fault handler to it.
 
@Mysticial Expense would depend. You'd want a pair of registers for each range specified, so the expense would basically be linear on the number of ranges you supported. You'd probably want to do something like a page table, where the user can specify an essentially infinite number that are stored in memory, with a special cache to keep the most-used ones in CPU registers.
 
@JerryCoffin Oh, I was thinking more on the lines of overflowing word-sized integers.
So rather than setting the carry-flag and having all the dependency logic for that, you issue a fault instead.
No state needed.
 
Ell
4:27 PM
TRAMP mode is so good
 
@JerryCoffin That one changes the meaning of decltype(auto) though, right? :D
 
@Griwes Yeah. Yet another reason to avoid it.
@Mysticial That would eliminate comparators, but you'd still need to do something to say which word's carry output would generate a trap signal.
 
Xeo
@JerryCoffin Gotta admit, I like return (non-trivial expr);
Although I kinda came to like parenthesising non-trivial exprs in almost any case.
 
you make me sick
 
posted on September 22, 2016 by Herb Sutter

Thanks to everyone who responded to the little puzzle for CppCon that I posted on the weekend. I’ll show a couple of answers in my talk tomorrow at the conference, which will be recorded and should be available on YouTube in a week or so. My talk will focus primarily on how to use the great […]

 
Xeo
4:35 PM
@LucDanton yay I accomplished something.
 
Ven
LOL WTF.
Elscreen (Tabs for emacs) has a limited number of screens.
Go fuck yourself, if I want 200 tabs I'll get them.
And now my colleague is asking me why Sparkly Bjarne is Sparkly.
 
@Xeo I prefer to avoid visual noise. I only add superfluous parens if an expression has enough levels of precedence involved that it's no longer obvious what's intended (or going to happen) if the parens aren't included.
 
Xeo
@JerryCoffin I just started to feel that the parens actually make it look cleaner. Dunno, I'm prolly weird.
 
yeah it should be return $ non-trivial expr instead
 
@Xeo As long as you've hung out in the lounge, weird can be taken for granted. :-)
 
Ven
4:49 PM
@Xeo we use return () only if there are infixes in the return expr
 
Xeo
@LucDanton hrhr
@Ven yeah pretty much
 
@Abyx That's not verbose enough!
bool result;
if (bool_var == true)
{
    result = true;
}
else if (bool_var == false)
{
    result = false;
}
else
{
    std::exit(bool_var);
}
return result;
 
Xeo
I also like it for variable inits
 
Ven
@fredoverflow actually that else can be useful to track down a UB-induced bug... :P
 
Shall we really go down the "try to detect UB at runtime" path? :)
> How long does it take a C# developer to get fluent in C++?
How would you answer that question?
 
Ven
4:53 PM
@fredoverflow Never :D
 
a lifetime and a half
 
7
A: C++ for C# Developers

Rei MiyasakaThis thread on C++ for Java developers is very similar and should be useful, especially Mark Byer's post: Read these books: Effective C++ Sutter's books - Exceptional C++ style for example Modern C++ Design Probably the most important thing to keep in mind is to understan...

> One of my profs came from a Java background and taught an introductory C++ course thinking it would be cake. Nothing he explained made any sense to anyone. He had had memory leaks everywhere. His pointer arithmetic was terrible. He never got to the OOP part of the syllabus (thank god). Virtually nothing he demonstrated would have compiled. He didn't understand that char[] needed a sentinel \0. Don't end up like him.
lol
 
user1804599
 
@fredoverflow To paraphrase Dijdstra: "It is practically impossible to teach good programming to students that have had a prior exposure to C#: as potential programmers they are mentally mutilated beyond hope of regeneration."
The beauty of this is that you can substitute any language you (don't) like.
 
Just because C# has goto? ;)
 
user1804599
5:05 PM
goto is shit
 
user1804599
it has a side-effect
 
@fredoverflow There are much better reasons to dislike it than that. Finalizers that you can't depend on (ever) running, for example.
 
user1804599
#1 worst C# feature: side-effects
 
What's a side-effect and why is it bad?
 
5:11 PM
a = a + 1;   // Oh noes, we cannot reason about the program anymore :(
 
user1804599
@ThePhD a side-effect is something that a program (i.e. statement, expression, method, etc) observably does other than returning a result
 
user1804599
Functional programming is programming without side-effects.
 
user1804599
@fredoverflow in Erlang A = A + 1 would simply fail with a runtime error :)
 
user1804599
Because the sides don't match
 
> Briefly, in C++, destructors run deterministically, run on the current thread, and never run on partially constructed objects. In C#, a finalizer runs possibly never, whenever the garbage collector decides it can run, on a separate thread, and on any object that was created—even if the constructor didn't complete normally due to an exception. These differences make it quite difficult to write a truly robust finalizer.
@JerryCoffin wow
 
Ven
5:21 PM
Some C# guy wrote six (iirc) blog posts on finalizers gotchas in C#.
 
user1804599
@Ven A Finalizer, is that a machine which turns you into a Fin?
 
Ven
@rightfold Nat > Fin
 
user1804599
Naturalize the Fin
 
@fredoverflow Being honest, I probably should have just said "Finalizers" and left it at that. I'm not sure there's anything about them that's really sane.
 
5:52 PM
@JerryCoffin Cheers.
 
tfw compiler team won't fucking answer your e-mails
gdi compiler team
 
6:18 PM
кек
they know it's too hard for them if it's from you
they need to ring up STL
 
6:41 PM
@набиячлэвэли He's a library guy, not a compiler guy.
 
@rightfold Of course not. It obviously turns you into a fish.
 
Ven
7:03 PM
@JerryCoffin then I gather a womanizer turns you into a woman?
 
7:16 PM
@Ven I assume you ran the word through your analyzer to reach this conclusion
4
 
8:03 PM
I need some new gaems
any suggestions?
 
@Puppy games? wow
 
8:22 PM
@Mysticial do you know a study/resource that shows the fastest (not most precise) forms to evaluate small polynomials?
horner's form a + x*(b + x*(c + d*x))... has the least operations
but also has 0 ILP
 
@Mysticial and then there is also FMA to take into account
 
user406009
@Puppy How about old games? Have you played System Shock 2 yet?
 
thoroughly
 
@Ven Singing Womanizer may make you a slightly crazy woman, anyway.
 
8:35 PM
@orlp No, but I've studied them a bit myself.
 
@Mysticial care to share your wisdom?
 
It depends on whether you're optimizing for latency or throughput.
 
latency
if I wanted throughput I'd be using simd
 
Horner's method has the best operation count and therefore the best throughput. But it isn't the best for latency.
 
@Mysticial well, that depends, no?
oh no wait
if you have many many polynomials
you can interleave them
(and interleave multiple SIMD, as long as you have registers)
but I do not, just 1 polynomial, as fast as possible
 
8:38 PM
If you're trying to sum up a single very large polynomial, you can factor it as:
`a + a0*x + a1*x^2 + ... + an*x^n + x^n*(b + b0*x + b1*x^2 + ... + bm*x^m)`
You can compute each half in parallel. Then use binary exponentiation to compute x^n.
 
@Mysticial I'm interested in polynomial sizes of 0-16
really micro-optimization
 
Each half can be done using whatever is optimal for that size. Whether it be Horner's method or another recursive split.
 
although as you say, if you know the optimal forms for small sizes, you can combine the for larger ones
 
David Schwartz, CppCon: “We have at least three solid compilers. We have ICC, we have GCC, we have Clang.” 🤔😐🙁☹️😢
14
Damn, REKT.
 
@orlp You can do the math. For 16, using Horner's method directly has 16 FMAs in sequence x 5 cycles on Haswell. So that's 80 cycles. If you split it in half, you cut it down to 40 cycles. While you're summing up the two halves (say using Horner's Method), you have enough issue slots to compute x^8 by squaring x 3 times. So that's free. One final FMA at the end combines them for a latency of 45 cycles.
 
8:42 PM
@orlp At least in theory, the minimum latency is probably to handle exponentiaion on individual terms in parallel, then basically a binary tree of sums.
 
So splitting seems to help even for the 16 case.
 
beep beep beep beep keep editing guys :P
I've turned that sound notification off many times
but it keeps magically turning itself on
 
@ThePhD he did later say that he uses Visual Studio, but that was a great line indeed
 
@Mysticial maybe a better question is
what does the execution port setup look like for respectively fadd, fmul and fma?
and latencies
 
On Haswell? Or Skylake?
 
8:44 PM
did it change in between?
 
yes
 
I looked into agner's tables myself
 
quite significantly
 
and for skylake it said latency 3 for fadd 5 for fmul
but that seemed high
so I'm not sure if I looked correctly
 
@orlp That's for the x87 FPU.
 
8:45 PM
oh
 
On Skylake, all SIMD FP is 4 cycles flat. (with the usual exceptions of division and shit)
 
I'm not doing SIMD though
what should I be looking for?
 
Let's back up a bit.
On Skylake, they separated the x87 from the vector unit. Physically.
The x87 and the extended precision retains the old latencies of 3 cycle fadd/fsub and 5 cycle fmul. I'm unsure of the throughputs though.
The vector unit is now by itself. All FP is 4 cycles flat. FP add/sub, mul, FMA - all of it is 4 cycles.
 
wait, is x87 still used for 64 bit non-vectorized fp code?
I thought you meant I was looking at old instructions
 
There are two (nearly identical) FP ports each of which can run these 4-cycle FP instructions in 1/cycle throughput.
 
8:49 PM
alright
 
@orlp Not anymore. Compilers don't generate x87 anymore unless you're using long double or something. And then you need a compiler switch or something.
 
that makes analysis for fp simd code quite easy
@Mysticial and for non-simd?
 
@orlp You mean like scalar SSE?
 
I mean double f(double x) { return x*x; }
for example
just regular ol' fp code no simd
 
@orlp Modern compilers will compile them to scalar SSE (assuming they don't auto-vectorize).
Scalar SSE is the same as vector SSE. 4 cycle latency. 2/cycle throughput.
 
8:51 PM
alright thanks
but 4 cycles?
really?
 
Same execution units, but with the upper lanes turned off.
 
I always had in my mind that floating point ops are just 1/1 cycle throughput/latency
 
@orlp They were never 1 cycle latency. But they've had 1 and 0.5 throughput for a long time.
 
@Mysticial alright
FMA is on the same ports as regular FP?
cause IIRC I saw some pictures with a separate FMA port drawn
 
Yes. Skylake's vector FPU is FMA-only. FP add is a*1 + b. And FP mul is a*b + 0.
That's why everything is a flat 4 cycles.
Even the integer multiply is 4 cycles + an additional cycle for int/float bypass.
They all use the same native FMA unit.
It was intentionally designed that way because they'll need to fit 16 of them in AVX512. (8-wide SIMD, 2 ports)
 
8:55 PM
just out of interest
what prevents them from installing a whole bunch more execution ports?
IIRC the circuit size of actual computation is tiny compared to all the scheduling/cache circuits on a die
 
Nothing. You can add ad many as you want. But you won't be able to keep them fed.
 
why is that? are you limited by instruction decoding speed?
 
Haswell and Skylake have 8 execution ports. 2 of which can run FP instructions. But you can only sustain 4 inst/cycle.
 
that 4 inst/cycle, is that instruction decoding limit?
 
@orlp That's just one bottleneck. The main one is the O(N^2) cost for dependency analysis needed for OOE.
 
8:59 PM
@Mysticial maybe we should have two coprocessors in a machine
 
@orlp That is also the decoding limit. But they chose the same 4/cycle limit for almost everything since the smallest will be the bottleneck.
 
one OOE for general code
 
@Mysticial well that's one way to simplify your micro-ops
 
one statically scheduled processor for signal processing (encoding, decoding, compression, crypto, music, etc)
 

« first day (2168 days earlier)      last day (2791 days later) »