Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Reelya

Pages: 1 ... 11 12 [13] 14 15 ... 1162
181
General Discussion / Re: The Opinion Sharing Thread
« on: November 15, 2020, 10:12:06 pm »
I propose Cake Charts as a new take on Pie Charts. In a Cake Chart, you encode another bit of data for that segment in the height of each slice.

For example, you'd have each pie segment being the percentage of the population which are boomers, millenials etc, and the height of the pie slice would be the average wealth per person. The volume of each slice would then be the total wealth held by all Boomers. etc.

182
General Discussion / Re: Things that made you go "WTF?" today o_O
« on: November 15, 2020, 09:53:36 pm »
The absolute saving. But the relative saving is smaller. I.e. it would be lower on your optimization priority list and would be less likely to push you to match your requirement.

I edited to explain why that's not true.

If you loop a slow thing 1 million times and a fast thing 500,000 times, then the slow thing is still where you want to do that optimization, because there is an absolutely larger number of loop instructions going on. So saying to optimize the fast thing because "relatively" it's sped up more is a false economy, because in absolute terms, this had less effect on how fast your entire program was.

So there's no actual tension between relative and absolute savings here: which ever optimization has the most absolute improvement on the program's speed is also the one that just happens to have the most relative improvement, when looked at holistically.

Or, in percentage terms, if you say "we can save 10% on this part's speed, but 50% on this other part, so let's do this other part" is misleading, if the first part is 10 times slower to start with, so 10% of that is actually more in real terms.

183
General Discussion / Re: Things that made you go "WTF?" today o_O
« on: November 15, 2020, 09:42:25 pm »
It's really not that, which is my point. It's the number of iterations you run per frame which matters. If you do 1 million things per frame, and you remove the iterator overhead, then it doesn't matter whether those things had 1 instruction or 10 instructions in them, the saving is the same.

EDIT: Or, you could argue about things that aren't frame-limited, so let's do that. Say there's a quick loop, and you do it a million times, and it spends 20 seconds dealing with the loop counter / tests and 1 minute dealing with the 'guts', vs a slow loop which you also do 1 million times, and it spends 20 seconds dealing with the loop and 10 minutes dealing with the guts. The saving from unrolling the loop in both cases is the same: 20 seconds sheared off the task. The same amount of time saved by doing the optimization. So, if you had a 'tight loop' and a 'slow loop' then it wouldn't necessarily make any more sense to unroll the tight loop if the slow loop had more iterations going on.

The point is that X milliseconds is still the same percentage of a frame assuming you're working to a set frame rate target, so the low hanging fruit is always the iterator with the most number of loops regardless of how 'slow' it is.

184
General Discussion / Re: Things that made you go "WTF?" today o_O
« on: November 15, 2020, 09:35:59 pm »
If the loop counter and jump is a meaningful percentage of your loop time... I don't even know what to say about that!  :P

Interesting data about the cache and other differences in those CPU generations by the way.  It's definitely not an obvious result, but I concede the point.

Aside: I've only ever personally unrolled loops for some vector math, duplicating a line of code 3 times.  I can't imagine loop unrolling of this type is really responsible for the type of code bloat we were initially discussing...

It is, if for example you are doing some instruction per-pixel at around 1024/768, then that's about a million additional computations that you're doing per frame. having an additional million things you can do per frame is worthwhile.

So, don't think in terms of 'percentage' but realize that in many situations you have a hard cap on how long something is allowed to take, for example, old hardware or consoles where there's a set refresh rate and if you miss that, it halves your frame rate. So in other words, a bit of loop unrolling frees up some time before the next refresh giving you extra computations to work with or avoiding stuttering. So, if you're aiming for 60 FPS, you need to fit whatever you're doing into 16 milliseconds, no matter what, or it bumps to the next refresh, which gives an effective FPS of 30 instead.

185
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 09:01:04 pm »
Bill Hicks ranted about the whole "think of the children!" thing. He asks, what, once they reach a certain age they're no longer on your love list or something.

Basically it's a hollow slogan you tack onto whatever else you want to push, as an emotional blackmail appeal, as if you promote your policy with "think of the children" then anyone who disagrees with the policy is by extension "anti-children", regardless of how fucking dumb the policy is and whatever effects it has on actual children, which are usually deleterious.

186
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 08:47:26 pm »
I think it's even clearer if you use the dichotomy about abortions. The conservative opinion is that nobody should have an abortion, so the liberal opinion must therefore be that everyone should have an abortion. (EDIT: I wish this was a fake example but I'm pretty sure that there are commentators out there going on about how the libs love it when people have abortions).

It kind of makes me think of Bizzaro world in the Superman comics, where everything is opposite.

Or, In Soviet Russia, abortion has you.

187
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 08:27:10 pm »
The most controversial on that list is probably "Homosexuality should be discouraged by society" versus "Homosexuality should be accepted by society". The full opposite would be "Homosexuality should be encouraged by society." 

Actually, that's still slightly off, as the remaining cognitive dissonance shows.

The opposite of "discourage" is not "encourage" it's "not discourage", and it's clearly wrong to say that "not discourage" and "encourage" are synonyms. "not discourage" and "accept" are actually closer in meaning. For example, to discourage payment with bitcoin, to not discourage payment with bitcoin, to accept payment with bitcoin, and to encourage payment with bitcoin all have different meanings, but the two middle ones denote neutrality on the issue.

Pew actually did the right thing here, since saying "conservatives discourage homosexuality, while liberals encourage homosexuality" would actually read like something designed to mislead.

Also, there's nothing written into the rules that the conservative position and liberal position on a topic even must be diametrically opposed. The viewpoints can well and truly be orthogonal.

188
-70°C is  255°D, though. ;)

I had to look that up. Delise scale is it? Points for obscurity, but we can go higher numbers with Rankine; 365.

189
Someone here was telling me how the Pfizer vaccine was basically endgame, but I told him that I'd heard that it has some problems. Mind you, this guy also loves Trump, and was also spouting the election conspiracies in the same conversation. This guy is also Jewish, so I told him that a lot of Nazis are supporting Trump and he didn't want to hear it. The same guy was saying the pandemic is fake earlier on. He was also saying masks don't do anything since a virus could get through the mask. I tried to point out that the amount of virus that gets through the mask makes a big difference, but he seemingly had a hard time grasping how that works. If you get infected with 1 virus particle then it might breed up to the point that you have a problem, but your immune system gets a huge head start on fighting it off, in that situation, compared to someone coughing a cloud of virus right in your face and millions of viruses getting into your lungs and breeding like crazy. The difference really isn't that hard to comprehend, is it?

This guy was also pushing hydroxychloroquine a few months back, and the really telling part is that when I told him I heard that there were real problems with that vaccine he countered with "but on Facebook I heard ..." and that was the actual last straw and I fucking cut him off and yelled at him that what you read on Facebook shouldn't be considered verified information. "but on Facebook I heard ..." pretty much explains where this guy is getting all the stupid shit he comes up with, since this guy isn't savvy enough to have gone on any right-leaning forums etc. It's like a leaky dam and you're wondering where the water is getting in, and I think I found it.

Anyway, on the Pfizer vaccine, I'm reading right now that it requires storage at -70 degrees celsius, apart from the other problems I was aware of already. That's -94 Fahrenheit. This seems like an obvious flaw for something that we want to roll out to everyone.

190
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 07:08:24 pm »
This economist article has details, but the particular chart I want to bring your attention to is annoyingly hidden under 'pay to subscribe to see more of the article'.  You can spot it for a second before that comes up, but you can't really get a good look at the thing.

On Firefox at least, spamming the Esc key prevents those pop-ups from occurring, but that one clearly has a timer in the script and if the pop-up isn't up, it tries again. So I was able to read the whole article but had to hit Esc frequently to avoid the pop-up appearing. Well here's the direct link to the chart if anyone wants it

https://www.economist.com/img/b/600/954/90/sites/default/files/images/2018/09/articles/body/20180922_USC938_0.png

As per the article, most of the further-left candidates who won Democratic primaries were in solid Red constituencies, so not in places where they had a shot at winning. What they're probably seeing there is that if there's no chance of actually winning then pragmatism isn't as important as sending a message about values, whereas pragmatic candidates wouldn't stand in the first place in that situation. It could be that this is a thing where it's not mirror-image on the right. For example, if Republicans are selecting a values-candidate for an election in a deep blue electorate, then they're not actually more likely to pick a hard-right candidate, but a 'conscience conservative', i.e. they're also more likely to pick someone further to the left in that situation than who would be running in a competitive election.

191
General Discussion / Re: Things that made you go "WTF?" today o_O
« on: November 15, 2020, 06:20:09 pm »
Yeah, you guys are saying what I was thinking about. IIRC loop unrolling helps because it decreases the number of branches dealt with, but loops are generally easy branches to predict so branch prediction nowadays removes most of the benefit of unrolling.

The history is mixed up here. They didn't even have predictive CPUs back when loop unrolling was the main thing you did. So it's basically completely wrong to say the main rationale behind loop unrolling was about decreasing branches. There were no branches.

What loop unrolling is for is avoiding the instruction overhead per cycle. By unrolling a loop, you get rid of the counter variable and the jump instructions. You will save the one hit on the branch prediction, but only on the last iteration, and by the time that was important, well instruction cache size was becoming important, too, so loop unrolling was already becoming counter-productive.

The branch penalty thing is a thing where if it makes sense to unroll the loop for other reasons, or all else being equal then it might tip it over the edge to being worthwhile, rather than being the main show. For example, say you're looping something 1024 times and you decide to use a little loop-unrolling. You might unroll on 8s, so you do 8, increment the index by 8, then do another 8 and so on. You'll get the benefit of unrolling, but you can fine-tune this so that it doesn't overload the instruction cache, and find an optimal value for how many you step through per loop. However, the branch predictor will only fail on the last iteration, so once per 1024 elements, no matter if you unrolled this loop or not. So, given even the most rudimentary branch prediction on the CPU then unrolling in this case wasn't about that. Partially unrolling loops is far more common than completely removing them, which is what you'd need to do to get any benefit of avoiding branch misses.

192
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 04:34:38 pm »
My point as above really was, some of those things McTraveller just mentioned actually are part of rational conservative viewpoints, but those aren't the things that people get upset that people disagree with. The stuff people want to freely push and not get any push-back tend to be FOX News type talking points based on misinformation. Nothing actually to do with a coherent conservative viewpoint on a topic.

Or LordBaal, I get why he hates Maduro, but if that is couched as "and Hillary is the same as Maduro!" or someone attacks the Swedish Model by saying that it will inevitably turn into Venezuela, well, these are no longer rational arguments about the issues and are veering into irrational polemics. Everywhere else is basically not Venezuela - Venezuela is an outlier that gets a lot of attention for the specific reason that nowhere else on Earth works the way Venezuela does. Even very similar countries that are like Venezuela and had leftist leaders didn't turn out like Venezuela, so it's irrational to say for example that voting Hillary or Bernie would turn USA Venezuelan, and has basically zero to do with taking an actual conservative viewpoint on any issue.

EDIT: Personally, people probably know that I myself have said some stuff here that's considered right of center over the years, but the difference is that I'm saying those things based on looking at the issues or reading research and coming to conclusions about it, and look for third-party information if that's challenged. I'm sure it would be a lot different if I went to a right-wing site and copy-pasted their talking points. So I think there's a cognitive dissonance based on that, too. On 'conservative' media sources you'll get pre-prepared 'conservative' opinion points, and people will believe those in good faith, and when they're repeated outside the conservative ecosystem / echo-chamber and get push back, they get upset that "conservative opinions are not welcome".

No, the problem is in fact that those FOX type talking points are put together in a vacuum for the faithful to spread to the faithful. They're just not designed to withstand scrutiny when talking to people who are basically skeptics from any perspective that's outside the FOX bubble, not just "leftist" scrutiny. QAnons and their "Qproofs" which are entirely circular logic and basically built on outright lying are just the Ultimate Form of the type of stuff FOX etc put out. People here tend to be skeptics, not communists. For example, if you came on here as a super Biden supporter you'd be shredded instantly, the same as a hardcore Trump supporter. And I don't think that's because, for example, everyone here is more left-wing than Biden.

FOX News talking points really were not designed to stand up as coherent debating positions. So when people spread them outside that echo-chamber and people start dissecting what was written, they get upset that the 'leftists' won't let them have their opinion.

193
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 09:05:27 am »
One issue is that a lot of the right wing comment on here that you see people complaining that they can't express isn't exactly of the highest quality. For example expressing that America's private health system works great and scare mongering what would happen under a single-payer system (which is easily contradicted since many many countries have that system and those nightmare scenarios didn't happen) isn't a rational position based on a "conservative" viewpoint, it's just delusional and/or deliberately ignorant and being obtuse.

So you get people posting that kind of stuff occasional, then they get mad and talk about how on their conservative discord they're allowed to say that stuff and nobody fact-checks them, and that's what free speech is all about apparently. That's not a problem with people being not allowed to speak, it's a snowflake uncomfortable having to provide sources to justify their opinions.

194
General Discussion / Re: Things that made you go "WTF?" today o_O
« on: November 15, 2020, 04:08:30 am »
When your loop is unrolled, there is no branch. The code is one long string of spaghetti. HOWEVER, as the wiki article on unrolling points out, it HIDES this performance hit.  Instead of sailing along at fucking warpspeed and then suddenly go "Deerrrrrrrp" for a moment (as either branch prediction fails and a cache miss happens, or when memory must be accessed for some other reason), then sailing along at warpspeed again-- it instead stays in Derrrrrrrp type speeds, because it is constantly hitting the memory bus.

This explanation doesn't feel right. First, how branch prediction actually works.

Quote
In computer science, instruction pipelining is a technique for implementing instruction-level parallelism within a single processor. Pipelining attempts to keep every part of the processor busy with some instruction by dividing incoming instructions into a series of sequential steps (the eponymous "pipeline") performed by different processor units with different parts of instructions processed in parallel.

Loop unrolling, branch prediction and cache hit prediction are actually not the same thing, at all. Loop unrolling is about avoiding the instruction hit on each iteration, since you have to process the jump instruction. And, in a loop you need to keep track of the loop counter, which means you're really doing multiple extra instructions per loop: update the counter, test the counter, then jump if the test is true. If the test is false, that doesn't cause a memory page load, which is laggy. That's not what's happening.

How that intersects with branch prediction is that each time through the loop, the branch predictor will correctly predict that the loop will continue, except on the last iteration, in which case it will make the wrong call, thus have to flush the instruction pipeline. but, categorically, this is nothing to do with memory cache hits.

As for branch prediction, imagine a program as a restaurant with a chef and 19 assistants. If you know what you're making then you might make 10 souffles an hour. But, if the chef suddenly says to stop making souffles and make a lobster, then all 20 people's prep work needs to be thrown out and started from scratch: but because it's a pipeline, we throw out pre-prep for 19 souffles. We effectively lose 20 souffles (10 souffles worth of completed work and 10 souffles worth of people standing around waiting for the new prep to get up to them), because there was a surprise lobster in the mix.

CPUs do branch prediction, which means they store some data about what path was taken last time, and try and prep for that same result next time, so if last time we made souffle then we prep for another souffle. So CPUs read-ahead in the instruction queue and pre-process the instructions, in such a way that all parts of the CPU are doing something.

The absolute worst-case scenario therefore for an "if" statement is one which flip-flops between true and false. For example, if you loop through some numbers, and say if it's odd, do this, and if it's even, do that, that's going to royally fuck with the branch prediction. What you would do is unroll the loop into pairs, then do the odd value and even value on different lines. This would be like the chef telling the staff ahead of time that they always alternate between souffles and lobsters. But, unless there's a flip-flopping "if" statement inside your loop, the loop itself is only going to fail on branch prediction on the final iteration where it leaves the loop, not each time through the loop.

195
General Discussion / Re: AmeriPol thread
« on: November 15, 2020, 02:25:33 am »
More fraud debunking in case this comes up. This time from Matt Parker of Stand-up Maths channel.

https://www.youtube.com/watch?v=aokNwKx7gM8&ab_channel=Stand-upMaths

The short gist, and it really is short, is that there's a video by a guy Dr Shiva Ayyadurai, who did a scatter-plot of some specific metrics for Trump in Michigan, notes this declines from left to right, then claims this is proof that Biden was stealing Trump's votes.

The debunk takes about two seconds. If you plot the identical data from Biden's perspective, it looks exactly the same as Trump's. So it proves absolutely nothing and the "Dr" making the video is basically a liar who should have known that. But it's implied that Trump was losing something and therefore Biden was gaining it.

EDIT: The corollary is that there's even one point in the process where they groomed the metric in a way that doesn't actually make any sense. The claim is that votes for Trump as a candidate should positively correlate with votes for GOP as a party, which is fine so far: X should be positively correlated with Y is the claim. But what they actually plotted is X = "Trump Votes%" vs Y = "GOP Votes% - Trump Votes%". The claim was it was done this way because subtracting the Trump Votes% represents "missing votes" for Trump.

However, X was just "Trump Votes%" and they also subtract that value from "GOP Votes%", so they're really plotting X vs Y-X, which by definition skews to a negative correlation. They added -X to their Y values in a correlation plot, but hid it behind confusing terminology and logic. When you remove the trickery you get X being positively correlated with Y, the original claim of how things were supposed to be.

Pages: 1 ... 11 12 [13] 14 15 ... 1162