Use micromorts to fight terrorism - <AUTHOR> https://blog.arty.name/2015/миллимортом-по-террору/en.html <comment><USER2> While I like the idea in general, the result is a bit arbitrary. Why is it "153 people of 67 million French citizens have died in attacks on Friday"? Why not out of 508.2M people in EU? Or out of 2M people living in Paris?

Unless you calculate the micromorts for comparison between countries, limiting the area in such way doesn't make much sense. It's a single event -vs- activities which can be practiced for long amount of time. (someone with better statistics vocabulary can probably explain it nicely)

<comment><USER3> Wouldn't the set being chosen just resulting in different probability profile, and you get to pick one depending on your personal characteristics?

Ie. 2.5 micromorts is your risk if you're a French citizen, (153 + other death from terrorism) / (7.3 billions) if you're a human, 153/2M if you're living in Paris?

Edit: change the napkin calculation for correctnesss.

<comment><USER2> I don't think the human one would be true, because there were many more people dying in terrorist attacks over the last year. But otherwise yes, you could depending on the area provide different risks - which was my point: you can use it to compare continuous activities within some area / population group. But absolute values for single data points just don't give you much information.

</comment></comment></comment><comment><USER4> To be perfectly honest, I'm a little amazed that in the past fourteen years, there have been so very few terrorist attacks on US soil.

Any group of suicidal, minimally-trained jackasses with a couple thousand dollars, access to Craigslist or an Uncle Henry's, and the ability to go to a WalMart, could obtain enough weaponry and ammunition to stage a significant attack on the scale of what happened in Paris this week.

I have to conclude that the pool of such people that would be willing to commit such acts is vanishingly small.

<comment><USER5> It is also possible that the United States' security agencies are simply better than the vast majority of us are aware of. Or some combination of both.

<comment><USER6> Possible, yes.

But it's a fact that we're terrible at evaluating how likely/dangerous terrorism is. We percieve _far_ more risk than there actually is.

Terrorism is designed to play to our cognitive biases, as is the news, as is politics. A triumvirate of douchegoblins taking advantage of our inability to correctly assess risk.

</comment></comment></comment><comment><USER7> Interesting. While skimming over the Wiki for micromorts it's reported [1] that Ecstasy has a rating of 0.5 micromorts per tablet. Which I kind of already suspected, given how widely it's consumed versus the rarely occurring yet widely reported deaths that result from its use.

For perspective you get 1 micromort from traveling 17 miles (27 km) by foot. I've walked 8.91 miles (14.34 km) today, which comparatively would be as dangerous as taking an ecstasy pill...well probably not as it would scale differently. I wouldn't be surprised if simply attending a dance-party/rave would have a micromort rating of ~0.5, regardless of substances ingested.

[1] [https://en.wikipedia.org/wiki/Micromort#Additional](https://en.wikipedia.org/wiki/Micromort#Additional)

<comment><USER8> These generalizations are not helpful actually. If you walk a deserted road every day it would not matter how many miles you walk every day, you should only get 0 micromort, which is not the same as walking just right next to a highway.

Context is everything.

<comment><USER9> I think they are helpful. Sure, they are not especially detailed or accurate, but the point of the 'micromort' is to give some broader context to the scale of the risk to aid in understanding. Much like the "banana" is a radiation unit. [https://en.wikipedia.org/wiki/Banana_equivalent_dose](https://en.wikipedia.org/wiki/Banana_equivalent_dose)

The Micromort is not a very precise or accurate unit, but it does a reasonable job of communicating the broad 'order of magnitude' context. The disproportionate emotional response undermining rational thinking is directly countered by this frame of reference, which in turn addresses the disproportionate impacts of terrorism.

</comment></comment></comment><comment><USER10> >> After all the goal of shootings and explosions is not to physically destroy citizens, it is to scare them. So when people are not afraid, terrorists do not reach their goals. And if you succumb to fear, terrorists win.

Reminds me of Japanese people's reaction to the ISIS threat, they mocked them on twitter with memes[1]. Also they denied request of religious food for exchange students[2]. Any religion is not superior than others, so there will be legal or philosophical standings for them to be treated special.

[1] [http://www.nbcnews.com/storyline/isis-terror/japanese- twitte...](http://www.nbcnews.com/storyline/isis-terror/japanese-twitter- users-mock-isis-internet-meme-n291591)

[2] [http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objecti...](http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=11462331)

<comment><USER11> Wait, someone still serves a website with cold fusion?

<comment><USER12> Afraid so. I used to work there. The codebase is at least 15 years old in places. Team of 4-8 people looking after it and rolling out changes. Self- written CMS as well.

Every now and then somebody gets the idea of rewriting it in something else. Problem is that while it may look simple ( "I just need templates for front, section and articles pages") there is a lot of extras (see the 4-8 people and CMS). Note that newspaper companies don't have a lot of money these days.

I've heard they are having another go at it. For one thing it is hard to get CF programmers these days.

<comment><USER11> Awesome, I never expected an actual answer. Thanks!

</comment></comment></comment></comment><comment><USER13> As the husband of someone who is afraid of these sorts of things, I can tell you that this line of argument would be entirely ineffective. What would be effective? I don't know and I wish I did.

I suspect that I'm just unusually unfazed by things and fundamentally lack the ability to understand the perspective of people for whom bombings like this cause fear. This makes me sad.

<comment><USER14> People tend to be over concerned of risks that they feel that they have no control over. This is why the very real risk of driving a car is considered acceptable, but the much lower risk from something like a random pesticide in food is seen as much worse than the risk warrants.

Someone like your wife (or husband) needs a way to feel like they are in control. This is hard to do with terrorism hence why it is effective is causing terror despite the absolute risks.

</comment></comment><comment> vezzy-fnord Black swan events being unanticipated, it is futile to worry about them. It's commonly retorted that terrorist attacks should be interpreted as unique because of their intent. Yet no one actually fears the intent, only the end result (death, destruction, injury). Intent is relevant to drafting a response, but not to the public fear. Intent without resources or sophistication is also not meaningful. It is further stated that they are special because they're attacks on the social order. Yet this is a truism, because they only have such an effect if people permit themselves to make it so. More mundanely perceived events like business cycles or crime rates (many small events rather than one large event like a terrorist attack) have the same capacity for social ruin, but are not as feared even as they are significantly more protracted. It's all inexcusable bias.

<comment><USER15> The response to terrorism isn't about fear. It's about justice. These assholes are trying to drag us all back to 700 AD and reestablish the Caliphate, and they struck at a bastion of western liberalism to that end. You can't appreciate the human reaction to that by short sightedly looking at the risk of dying in a car accident.

<comment><USER16> Unfortunately, goading western countries into wars we can't win is the basis of their strategy. So if your attitude causes you to short-sightedly support military action out of fear (even if you tell yourself it's anger), you're helping the terrorists win.

<comment><USER17> ISIS isn't trying to goad us into war. They're _waging_ war on us, and doing so effectively. The kind of probabilistic analysis proposed by the OP takes terrorist attacks as if they occur randomly at some rate we have little control over, like car accidents. That is not the case when you have an enemy actively killing you and you have to make a decision: fight back, or signal that you won't fight back. If the latter, the number of "micromorts" is going to increase exponentially.

<comment><USER16> No, goading us into war really is their strategy, whether it fits with your worldview or not[1]. They currently rule over lands whose governments we destroyed, using weapons that we brought there and gave to the "good guys". They are well aware of this, and it is what they want.

[1] [https://azelin.files.wordpress.com/2010/08/abu-bakr-naji- the...](https://azelin.files.wordpress.com/2010/08/abu-bakr-naji-the- management-of-savagery-the-most-critical-stage-through-which-the-umma-will- pass.pdf)

<comment><USER18> Of _course_ it's their strategy. That doesn't automatically mean that by obliging them the French would be "helping them win."

</comment></comment></comment></comment></comment></comment><comment><USER19> The other day I read that someone has been purchasing bomb grade uranium from a source (or a chain of people) who have been traced back to a Russian General in charge of a nuclear weapons facility. I think I might have heard about it first via HN, but not entirely sure now. Anyway, it terrifies me to remember that there are people in the world who have known nothing of life's bright side and who were most likely psychologically damaged as kids living in the constant war zone of the middle east. Those who rise above it are usually brilliant people regardless of occupation and those who succumb to the darkness are the ones I worry about... They could feel a darkness so vast and so abysmal that the idea of stabbing the beast where it hurts (killing the civilians of nations that are partly responsible for what happened to them) is the only relief they have in a life where they've gotten no relief; only absolute terror and infinite trauma.

What could we do to identify such people and help change the course of human history?

</comment><comment><USER20> I don't think I'm going to die in a terrorist attack, and yet, I'm outraged and offended by acts of terrorism. I want them prevented and I want terrorists thwarted and destroyed. I don't think most people's opposition to terrorism and will to defeat it comes from a personal fear of becoming a victim.

Admonitions to shrug your shoulders at terrorism because car accidents kill more people always ring hollow with me.

<comment><USER21> What is terrorism? If two sides are fighting each other and one side has smart bombs and drones and the other side doesn't, clearly the choice for the weaker side is to give up or to find tactics that work to break its enemy's will.

The word terrorism is a propaganda word intended to make the audience pass moral judgment on the act and ignore the larger issue of why the conflict exists in the first place.

I too find acts of violence upsetting, but it's dangerous to buy into the propaganda around the word terrorism, since it's used to justify abandoning diplomacy and dehumanizing the enemy.

<comment><USER22> Terrorism is psychological warfare aimed at a civilian population. It could be an expression of frustration; an act by one who doesn't care, or cares exclusively and consumingly. And it is horrific, disgusting, and morally reprehensible.

The word is not merely propaganda, it is a word whose extremity exactly conveys the revulsion and moral judgement of the speaker. As with any label, you run the risk of superficiality and preoccupation with simplified narratives, but "terrorism" is NOT just propaganda, and it deliberately conveys more than "acts of violence". (A clinical term with its own problems of distancing audiences from the immediate reality.)

I wrote this because your last sentence seemed to imply something that I've noticed crop up in these kinds of discussions: the (typically Western) assumption that there is legitimacy to both sides of any conflict, and that, recognizing this, a diplomatic solution can be achieved. I've yet to see concrete evidence that this is the case. Short of deprogramming, how do you reason with a group of people brainwashed to be fundamentally unreasonable?

<comment><USER23> Was it terrorism when the US dropped the nukes on Japan?

Psychological warfare aimed at a civilian population, right? Even if you agree that it was, you have to admit that is not how the history books are writte, because we don't use the propagana term "terrorist" to describe our own actions.

<comment><USER21> Exactly. The drones flying over Pakistan and Afghanistan are intended to make the populations of the border regions worry constantly about being fired upon. It's what terrorism looks like when you have an essentially unlimited budget and don't have to resort to crude munitions like IEDs or suicide bombers.

</comment></comment></comment></comment></comment><comment><USER24> The risk of riding a motocycle can be estimated from a large sample. The risk of a terror attack in Paris can not. Friday's attach is 2.5 micromorts, but how do you know there is not another larger scale attach in the works? That is what worries, scares most people, until these attack become normal and people get used to it, like those live in Jerusalem.

<comment><USER3> Everyday passing by is a sample day that you can use to estimate the risks. Even if you argue that terrorism is a relatively new risk in the past few decades and start your sampling from September 2001, we still have more than a decade of sample days to estimate the risk. That's a _huge_ sample.

There might not be enough sample to know how many people would be harmed during a terrorist attack. But there is definitely enough information to estimate the risk of an attack itself.

<comment><USER25> Actuary here. I don't have the math at my fingertips, but to confidently estimate the risk of any occurrence you need a significant sample of the event, not just a significant amount of exposure.

So for instance, if you are estimating the mortality rate of a 25 year old and the rate for an 85 year old you would be equally confident in each estimate if your data sample contained an equal amount of deaths for each, not an equal amount of life-years.

So while we have many days of exposure to terrorism risk, we do not have many occurrences and therefore do not have a confident estimate of the rate of major terror attacks.

<comment><USER26> Definitely not an actuary here so forgive my ignorance: Isn't the fact that 'we do not have many occurrences' by itself enough to establish a lower bound?

<comment><USER27> You mean upper bound -- being a more likely killer than heart attacks is a statistical impossibility. Same for car accidents. Same for iron deficiency, Trypanosomiasis, and a bunch of other things.

<comment><USER26> Hm, no I really meant 'lower bound', as in 'we have seen x events in y days to date, so there can't be fewer than that'. And then you'd have to adjust that as more evidence rolls in.

<comment><USER27> Not an unreasonable conclusion, but let's say there is a true (hidden/unknowable) rate of deaths X. You'd expect, not knowing the statistical distribution, maybe half the time the measurement (adding deaths from events) it'll be less and half the time it'd be more, just like any other random variable measurement. So it isn't a lower bound, just a fantastic guess that's bound to be pretty close. How close will it be? Well, the sample size is pretty low, so honestly it could be quite wrong. This is what the mega- parent was saying.

edit: you can get a lower bound, from a statistical perspective, the same way, where you go out a couple standard deviations to make up for small sample size, e.g. terrorism is more dangerous than being hit by two meteors at the same time, but if you wanted to make the case terrorism is more dangerous than something strange like water overdose that's probably true but not a lower- bound level statistical certainty.

<comment><USER26> A I see (or at least, I think I see), it's just another bell curve and this is the center line of that curve?

<comment><USER27> It's a single data point on the curve, so probably close to average, but yeah, that's the notion.

<comment><USER26> Thank you for the explanation!

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER28> You have a point, but I'd suggest to replace "fight" with "be ok with".

<comment><USER29> Given the way terrorism works ([http://slatestarcodex.com/2014/12/17/the- toxoplasma-of-rage/](http://slatestarcodex.com/2014/12/17/the-toxoplasma-of- rage/)), "being OK with it" translates pretty directly into denying it a chance to reproduce and thereby killing it.

<comment><USER30> Right; you _fight_ "terrorism" by _being okay with_ "terorrists."

<comment><USER29> Yes, because they can't hurt you in absolute terms (as pointed out by the OP) and if you fight back you just _make them stronger_.

</comment></comment></comment></comment><comment><USER15> By the reasoning of the article, we should just shrug off murders because people are far more likely to die in a car accident. That is of course ridiculous. Terrorism is an attack on the social order. That precious stability that makes progress and liberal society possible.

<comment><USER31> No, by the reasoning of the article you should not respond to murder by starting to fear being murdered, as the odds of being murdered are quite small.

</comment></comment><comment><USER32> This is stupid, Black Swan event can't be dealt with classic probabilities. Terrorism doesn't follow a normal distribution, more like a Dirac distribution.

The simple averaging you used, I can use it to, but I am not only French, I am also living in Paris. Last year there have been 39 deaths from car accidents, 101 from homicides, and more than 147 from terrorist relative death an counting every few months in Paris.

I can also look at my age, and that I go to concert often then my micromort explode to the roof now.

You seems like the old ladys in the Terry Gilliam film Brazil.

[https://www.youtube.com/watch?v=U4KFNhxibec](https://www.youtube.com/watch?v=U4KFNhxibec)

</comment><comment><USER33> The problem is terrorism isn't like car accidents. In another thread somebody commented that more people die on the roads in a single day then died in the terrorist attacks in France. Sure. But the volatility in car accident statistics is tiny while the possible volatility in terrorist attacks is huge. One well executed attack could kill hundreds of thousands or possibly millions if nuclear, chemical, or biological weapons are used. Car accidents are a bell curve, while terrorism is the long tail. And while I'm not really afraid of a terrorist attack, underestimating or dismissing a large group of people trying to actively kill you is naive.

</comment><comment><USER34> Schneier called micromort a "great concept" ([https://www.schneier.com/blog/archives/2012/11/micromorts_1....](https://www.schneier.com/blog/archives/2012/11/micromorts_1.html)).

"There's a related term, microlife, for things that reduce your lifespan. A microlife is 30 minutes off your life expectancy. So smoking two cigarettes has a cost of one microlife."

</comment><comment><USER35> Doesn't this, if effective, encourage terrorists to up their game as well till enough micromorts register on our radars? Terrorists can skew things: they have raised the chance of death in an attack when you are participating in things they don't approve of (death to all the party goers.) This must be seen as an attack on society, rather than individuals.

</comment><comment><USER36> The risk of being shot in a mass shooting in the US is way higher but everybody seems blasé about it.

<comment><USER37> Hmm. 9/319e6 = 0.028 micromorts

[https://en.wikipedia.org/wiki/Umpqua_Community_College_shoot...](https://en.wikipedia.org/wiki/Umpqua_Community_College_shooting#Fatalities)

[https://www.google.com/#q=population+of+the+united+states](https://www.google.com/#q=population+of+the+united+states)

</comment></comment><comment><USER38> These are great! Can't believe that I didn't know about them before - I've been looking for simple metrics that compare the impact of things on mortality.

It's interesting that running one marathon per year is almost equivalent to being murdered in England.

</comment><comment><USER39> For the longest time, there has been Kashmir-related terrorism all over India, sponsored by Pakistan (which received "aid" in the form of money and arms from the US for decades prior to 9/11).

So, yes, terrorism is indeed very, very bad.

</comment><comment><USER40> Some types of death do have a stronger emotional effect on us.

Perspective is everything. Good approach :)

</comment><comment><USER41> When I see 'micromorts', my first thought is that it's an euphemism for assassination, possibly with drones.

<comment><USER17> I was thinking some kind of __mortar __but ultra-portable. Perhaps an iPhone attachment of some kind?

</comment></comment><comment><USER42> Any terrorist attack in France will almost certainly happen in the center of one of the major cities, most likely Paris. So if you live in the center of Paris your micromort should be much higher, and if you live in a small village it will be much smaller. Also the micromort calculation quoted in the article is for being killed in a single terrorist attack in which 153 people die. If you think there are likely to be several such attacks over the next few years then that increases the micromort value higher.

<comment><USER43> This assumes there is some incentive for terrorists to attack big cities. It could be strategically valuable for terrorists to just randomly attack tiny villages, where the response time for emergency services equipped to deal with heavily-armed moderately-trained militants is long enough for them to wipe basically the whole place out, and after which they can strike fear into any village and cause the governments to spend a ton turning all of them into fortresses.

</comment></comment><comment><USER44> Ok then! Why aren't we terrified about obesity, which is the leading cause of death in the United States, killing over 300,000 people a year. (See [https://www.wvdhhr.org/bph/oehp/obesity/mortality.htm](https://www.wvdhhr.org/bph/oehp/obesity/mortality.htm))

<comment><USER45> We _are_ terrified about obesity. The weight loss market in the U.S. is at roughly $60 billion.

But I wonder how long a single person can remain terrified about anything, or is indeed terrified by e.g. terrorism.

<comment><USER46> > We _are_ terrified about obesity. The weight loss market in the U.S. is at > roughly $60 billion.

That's:

a) an order of magnitude less than U.S. defense spending b) not funded by taxpayers

<comment><USER44> People really didn't like my Obesity comment! The number one killer has a "personal responsibility" component and the techno-libertarians here object. Go figure... We live in an upside-down world where good is bad and right is wrong.

</comment></comment></comment></comment><comment><USER8> That's cute, but it is already widely known that there is way less chance to die from Terrorism than anything else. And it is a common misunderstanding that Terrorism's goal is to generate Terror. It is not. It is a form of political action with political goals, and it has about nothing to do with how fearful you are in your daily life.

<comment><USER47> FYI, beginning a dismissal with "that's cute" kind makes it seem like you don't have a strong point and are resorting to name calling.

<comment><USER8> I actually explained my point. Read my full comment.</comment></comment></comment>


When optimising code, never guess, always measure - <AUTHOR> http://www.solipsys.co.uk/new/WhenOptimisingCodeMeasure.html?HNri05 <comment><USER2> I've never really spent any time reading Python bytecode, but disassembly suggests the difference could be:

        f3
        </comment><comment>
        92 LOAD_FAST                2 (a2)
        94 LOAD_FAST                3 (c)
        96 BINARY_ADD
        98 LOAD_FAST                3 (c)
        100 LOAD_CONST              1 (2)
        102 BINARY_ADD
        104 ROT_TWO
        106 STORE_FAST              2 (a2)
        108 STORE_FAST              3 (c)

        f4
        </comment><comment>
        92 LOAD_FAST                2 (a2)
        94 LOAD_FAST                3 (c)
        96 INPLACE_ADD
        98 STORE_FAST               2 (a2)
        100 LOAD_FAST               3 (c)
        102 LOAD_CONST              1 (2)
        104 INPLACE_ADD
        106 STORE_FAST              3 (c)

And perhaps the culprit is that INPLACE_ADD requires more work than BINARY ADD [https://stackoverflow.com/questions/15376509/when-is-i-x- dif...](https://stackoverflow.com/questions/15376509/when-is-i-x-different- from-i-i-x-in-python)

I strongly believe that the idea that it's running on multiple cores is not the case. Python doesn't implicitly schedule any user code on separate threads, and if it did, the coherence cost of doing so would swamp any benefit of doing two simple operations in parallel.

Disassembly is as simple as:

        with open('f3', 'w') as f:
             dis.dis(factor_fermat3, file = f)

        with open('f4', 'w') as f:
            dis.dis(factor_fermat4, file = f)

Edit: Whoops, I see that I used Python3, while the post was about 2.7.4, and there's some wrangling over the differences below. I reran the disassmbly under 2.7.4. The bytecode was more verbose, but differed in the same way.

<comment><USER3> This comment is excellent. The title of the original post should be: "When optimising code, never guess, always read the bytecode/assembly."

Without actually reading the assembly/bytecode/etc, you end up speculating about silly things like 'the two evaluations and assignments can happen in parallel, and so may happen on different cores.'.

<comment><AUTHOR> Indeed, I was unduly influenced by the code I was writing in the late 80s and early 90s that really did take languages with multiple assignments like this and ran them on different processors. You say it's a silly thing, but we used to do it - things have changed.

 _Added in edit: The magic term is "execution unit" not "core". As I say, things have changed, and the bundling of multiple execution units into each core, and multiple cores into each processor, is different in interesting and subtle ways from the situation I used to code, where I had a few hundred, or a few thousand, processors in each machine, but the individual processors were simpler._

<comment><USER3> I didn't mean to say this was a silly thing to do - most modern processors execute instructions out of order on multiple ALUs.

The problem is that the abstraction layer between the python code in question and the processor's instruction stream is so thick that it's hard to say one way or the other that the processor is indeed executing that _particular_ pair of instructions in parallel. It's definitely executing many instructions out of order, but it's unclear (without inspection of the python interpreter and its assembly) what's happening at the machine level.

Looking at the bytecode of the python program at least begins to tells us that the python bytecode of the two versions is fundamentally different, which could account for the performance difference. Although, what exactly makes the material difference is also under debate elsewhere in the thread. :)

</comment></comment></comment></comment><comment><USER4> A nice thing with using a compiled language (like Julia) is that you typically do not need to worry about these type of things. Using the identical code in the blog post in Julia (with some trivial syntactic modifications, [https://pastebin.com/RGYunpF4](https://pastebin.com/RGYunpF4)) we not only get a ~500x speedup but the speed difference is pretty much negligible between all the different implementations:

        factor_fermat0:  1.599 ms
        factor_fermat1:  1.488 ms
        factor_fermat2:  1.387 ms
        factor_fermat3:  1.421 ms
        factor_fermat4:  1.422 ms

Of course, you should still measure when you optimize, but dealing with issues such as whether a=a+1 or a+=1 is faster seems annoying. At that point, you are benchmarking the language and not your own code.

<comment><AUTHOR> I was surprised to see that your version of 0 ran nearly as fast as the others, despite the multiple calls to the square root. Then I realised that you're using the library sqrt routine, and I wonder if that would be accurate enough for the case I'm usually in where my numbers have hundreds of digits. I don't know what algorithm Julia uses for that, but I've found floats (and their friends) insufficiently accurate.

But that's useful feedback - thank you.

<comment><USER4> If you need higher precision you could always either simply bump up the accuracy a bit using e.g. [https://github.com/JuliaMath/DoubleDouble.jl](https://github.com/JuliaMath/DoubleDouble.jl) or you can use the arbitrary precision numbers in Julia ([https://docs.julialang.org/en/v1/manual/integers-and- floatin...](https://docs.julialang.org/en/v1/manual/integers-and-floating- point-numbers/index.html#Arbitrary-Precision-Arithmetic-1))

The performance will of course change accordingly.

<comment><AUTHOR> Is there an arbitrary precision square root routine? I've not found it ...

<comment><USER4> The concrete routine that is dispatched to is based on the type of the input number.

So `sqrt(2.0)` will, in the end, call the assembly-instruction (depending on your specific CPU) `vsqrtss` since the input type is a 64-bit float, `sqrt(Float32(2.0))` will end up calling `vsqrtsd`, `sqrt(big"2.0")` will call the sqrt from the arbitrary precision library (MPFR) since we now have a "BigFloat" number etc.

Directly from a Julia REPL session:

        julia> sqrt(2.0)
        1.4142135623730951

        julia> sqrt(Float32(2.0))
        1.4142135f0

        julia> sqrt(big"2.0")
        1.414213562373095048801688724209698078569671875376948073176679737990732478462102

        julia> setprecision(512) # Bump the precision
        512

        julia> sqrt(big"2.0")
        1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623091229702492483605585073721264412149709993586

<comment><AUTHOR> Yes, but I'm talking about getting exact BigInt ceil square roots of BigInt inputs. I've not found anything about whether that is supported natively or in a library.

</comment></comment></comment></comment></comment></comment><comment><USER5> I spent much of the Need for Speed sprint on Python doing benchmarking between 2.4 and the 2.5 alpha that we were trying to speed up. It was significantly slower than 2.4 at pybench.

Measuring performance is hard. It's easy when there are big differences, like the new exceptions in 2.5 were 60% slower. But small things can add up, and it's hard to measure them.

One piece of wisdom I got from Tim Peters: Run short benchmarks. The longer you run them the more likely they are to be influenced by context switches and the like. I used to always run long benchmarks hoping to push these changes down into the noise. Instead I started running short tests and looking at the fastest of the runs.

Another area of speed improvement though was less about A/B testing and more about thinking hard about where time is used and how to just get rid of it entirely. Some use cases really suffered because in Python strings are immutable. If you are reading from the network and, say, looking for the end of a data frame, you may create a lot of new objects as you append incoming data. IIRC, a "bytearray" was created that was basically a mutable string to get rid of that problem entirely.

</comment><comment><USER6> Also remember that the maximum speedup your program can get from a particular optimization is related to the total time your program spends executing that part.

You can speed up an algorithm 1000 fold but if it only accounts for 1% of your total execution time you've only gained a 1% speedup.

<comment><USER7> Exactly. Carrying the logic a step further, that means you should focus first on the longest part of the program. And confidently knowing the longest part of the program requires measuring it. QED

<comment><USER8> Not necessarily longest, though. Right? Most executed would also suffice.

Beware measuring, though. Sometimes, just thinking about the problem ahead of time can clearly expose where you are spending time. At least, it can give a hypothesis to test for where you are spending time. With measurements to confirm/refute. :)

<comment><USER7> > Not necessarily longest, though. Right? Most executed would also suffice

"Longest total." I don't care if its a big slice of pie or a lot of little slices. But it better be one of those.

> Sometimes, just thinking about the problem ahead of time can clearly expose > where you are spending time.

That's certainly true. But 99% of people overestimate their ability to do this. And are surprised by the results.

<comment><USER9> So when you say "longest" you don't mean "longest section of code", I'm guessing you mean "section of code in which execution spends the longest time".

If so, good, but it wasn't clear to me that that's what you meant. If you mean something else then I don't know what you mean at all.

<comment><USER7> "Longest" seemed clear to me. (Over "largest" and "slowest".)

<comment><USER10> IDK, "longest part of code" to me _clearly_ seems to refer to length of the code (i.e. lines of code), not to length of its execution time; so I'd say that there definitely seems to be some confusion caused by the choice of words.

<comment><USER8> Just to further these two posts, that is why I asked my question at the top here. "Hottest" code, I thought, was already well established for most executed. I had never seen "longest" for anything.

To that end, I was taking it to mean that longest "synchronous" path through your system. Not necessarily a single method, by any measure. But, systems have plenty of what I will call "checkpoints" where code can be restarted/rerun with no hard to recover penalty. That is what I took to mean by longest.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> This was prompted by unexpectedly finding that in Python 2.7.4, the fragment:

        a2, c = a2+c, c+2

ran faster than the fragment:

        a2 += c
        c += 2

Context and timings in the post. Speculation welcome as to why this might be true, and your predictions for Python 3 invited.

<comment><USER11> If you have performance bottlenecks, Python is the wrong language. The only place where this kind of investigation makes sense is if you're a Python VM dev.

<comment><AUTHOR> > _The only place where this kind of investigation makes sense is if you 're a > Python VM dev._

You are mistaken - this investigation does make sense in my context.

<comment><USER11> If you're having Python bottlenecks, it is the wrong language. First try Pypy, and if that doesn't/can't work switch to Julia/Go/R/C++ as your domain requires.

<comment><AUTHOR> You are right when you say:

> _If you 're having Python bottlenecks, it is the wrong language._

But you are missing the point. The object of the underlying exercise was not to try to make this specific instance of the algorithm run fast, Python was not the bottleneck. The activity was exploring the effects of algorithmic changes and investigating the Big-O performance of the different variants and changes. As a part of that the underlying code was being reworked and modified to allow the larger algorithmic changes to be made, and this was one of those changes. It says so in the post:

> _Then I made a small change to the code layout ready for another shot at an > optimisation._

As always I ran the timing tests (in addition to the functional tests) to make sure nothing substantial had changed, and there was an anomaly which attracted my attention and piqued my curiosity. Hence the write up.

And I believe you are wrong when you say that this sort of thing is, or should be, only of interest to Python VM Devs. I think that curiosity about this sort of thing is, or should be, important to everyone. Perhaps you will then decide you don't have time to pursue it, or that your time is better spent elsewhere, and that's fair enough, but curiosity and a desire to learn has been a pervasive theme among the best devs I've ever worked with.

So again, you are wrong, this investigation does make sense in my context. Your mistake is in assuming the post is about a Python bottleneck. As I say, you've missed the point.

<comment><USER11> The issue is that this investigation is so biased by what is slow in specifically the Python VM that I'm not sure what the effects would be in a case where performance is actually something you are trying to optimize for. The moment you translate this into C, C++, Java etc you suddenly have a smart compiler that can deal with things like function inlining, to where things like cache sizes and memory streaming speed will present as bottlenecks instead of object to object pointer jumping and bytecode interpreter overhead.

Languages don't get slower on a single dimension, and computers have multiple dimensions of performance. Hitting a performance bottleneck in one dimension on one language doesn't mean you'll hit the same bottleneck on a different language. Different scales might have different bottlenecks as well, think exceeding L2 cache or finally using all your GPU cores on problems that parallelize with scale. If you're using Python you'll never hit those other bottlenecks because the VM is always 40x slower than a naive native implementation.

Unless, of course, your bottleneck is in native code, which is where the easy prototyping of Python really shines.

</comment></comment></comment></comment></comment></comment><comment><USER12> In fact, this shows that "when optimizing code, know what your asymptotes are". It is more than an order of magnitude _trivial_ difference between 34 and 1.2, but the conclusion bases itself on silly 0.1 which plays no sensible role at all.

People take advices like "don't optimize" and then in 2030 someone 300byte- patches system updates so they would install at ~ssd write speed instead of sudden 1.5 hours. And everyone is like wow, how we overlooked that. You never hired an engineer, that's how.

<comment><AUTHOR> Your comment shows that you've missed the point. You're assuming that because I'm doing this kind of micro-optimisation that is, in the grand scheme of things, irrelevant, that I'm concentrating on the wrong thing.

You say:

> _the conclusion bases itself on silly 0.1 which plays no sensible role at > all._

You've missed the point. This specific code change is not the point for the task overall. This specific code change was preparation for a significant algorithmic shift that was about to happen. On the way I happened to notice something odd, and I thought people would be mildly curious, so I wrote it down for people to see.

Please don't assume that I'm clueless about the wider picture.

</comment></comment><comment><USER13> That's good advice that should be repeated over and over. I see it so often that people don't write clean code because that's considered not efficient but they don't have any real data.

Especially when you deal with optimizing compilers it's often totally counterintuitive where the real bottlenecks are.

Obviously you shouldn't be stupid and always shout "premature optimization" but make it a habit to profile from item and time and learn from it.

</comment><comment><USER14> It looks to me like you found out that Python is slow in even more ways than we knew. But we knew that. That is another cost of such a language -- that even things that rationally look faster are slower.

But machine code, and thus optimized compiled code, has moved into the same space -- the machine instructions are interpreted, too, now. Speeds are a thousand times more, but things affecting speed are way more complex, so reasoning is similarly compromised. It's a deal with the devil: in exchange for typical speedups of an order of magnitude or more, you lose the ability to tell what is making it slow, and even whether it is slow at all. What does slow mean, now? Only than another program is faster. But you need to have found it to know.

On modern chips (Haswell and later), a loop of only four instructions -- two comparisons, two branches, which may run for a microsecond or months, depending on input, may take time t or 2t depending on whether the compiler guesses right about which way one of the tests goes. It happens that gcc tends, systematically, to guess wrong on these. The difference comes down to whether the loop takes one cycle or two per typical iteration.

Using __builtin_expect() can overpower the compiler's guess, but who wants that in their code? But it doesn't always work either. Slightly older chips (Sandybridge) would always take the 2t months, regardless. So we got a really significant speedup, sometimes, at the cost of not knowing whether we are getting it, or what we need to do to get it.

Engineering is turned into shamanism and guessing.

At least we always know that a Python program will always be slower than any equivalent compiled program. But Mercurial is fast...

</comment><comment><USER15> How about:

1\. Get the data structure right

0\. Use a language that helps you get the data structure right

<comment><AUTHOR> How about assuming I have a good reason to be doing this task in this language. Probably you were trying to be helpful, but your comment comes across as incredibly condescending.

<comment><USER15> Hi Colin, the comment was not addressed to you.

</comment></comment></comment><comment><USER16> Nowadays, I'd agree. Back in the mid-80s when I was learning BASIC on my ZX Spectrum, not so much: there was no tooling. I mean you could, and I did, measure elapsed time, but you also had to experiment by tweaking the program. I suppose you were still measuring, but perhaps not in the way we'd mean when we say "measure" today. Nowadays, when I ask someone to measure something it's shorthand for, "your program is complicated: use a tool to help you." Back in the day it was easier: programs were simpler, and there was only one thing running on the CPU, and using devices attached to the system, at a time.

</comment><comment><USER17> When designing for performance, never stop measuring.

Establish time budgets for high-level operations. Measure performance continuously as part of integration testing to catch regressions.

<comment><USER18> It would seem like if performance is a big deal, you should have "unit tests" (or as they're called: benchmark code) with well-documented runtimes on specific hardware.

Stockfish Chess has a benchmark command, Cinema4d has Cinebench, and Blender now has its benchmark suite.

And really, a benchmark is just a unit test where you're testing for speed.

<comment><USER17> It depends on the app. For a game engine (and I don't really mean Stockfish, I mean a game loop with input, network, world scripts, rendering etc.) you have a target frame rate which gives a fixed time budget for everything to happen, and you might divvy that up between different bits of code, where it makes sense to budget at a fine-grained level.

For something with a core loop, and all the value is in the core loop, sure, you can perf test the core loop.

But many applications are big, with lots of entry points, and data being worked with can come in different shapes and sizes. Sometimes it can have different dimensions that stress different bits of code. And it may be difficult to plan the breakdown of a global budget in this context.

Part of the catch-22 of optimization is that you need to profile before you optimize, otherwise you're likely to optimize the wrong thing. If you put your benchmarks at the unit level, you run the risk of having individual bits that are fast, but the whole doesn't run as fast as you'd hoped.

<comment><USER18> But I stand by my claim. Game engines often ship with some kind of benchmark suite. For example, the "Total War" games often have a benchmark where the camera moves across a pre-set map and a battle takes place.

Now true, there can still be UI issues which need to be optimized, but my point is that if you want to test the speed of your rendering engine, of the animation framework, unit-pathing, or whatnot, its best to build a benchmark where you can repeatedly document and execute the critical code path.

A singular, automatic test, which can be run nearly automatically (without user-intervention)... as well as a documentation regime which can document progress on the benchmark, is key to improving the code.

</comment></comment></comment></comment><comment><USER19> If you built the compiler, can't you just throw a few helpful notifications/logs letting a user know when they are using unoptimal paths/techniques? I'm by no means a compiler developer but curious if it could be more automated without resorting to debugging tools?

<comment><USER20> Yes, LLVM has analysis passes which you could do this with. However, just profiling the code is usually goood enough (It's usually pretty obvious where the problem-code e.g. Something blocking from the hardware)

It is worth pointing out that, currently, compilers can basically only do what they're told to do (Like a state machine) so this kind of stuff would be unlikely given that the effort with either be wasted or only part of a larger program (Just optimize it away).

</comment></comment><comment><USER21> Is the Python executor actually using multiplication for the square and left- shift for the multiply by 2? If not, that would probably be the biggest change he should be making...

Edit: guess it doesn't matter - Python is so ridiculously slow either way...

</comment><comment><USER22> Or you know. Guess, then implement a test, then measure. Visa vi the scientific method.

<comment><USER23> "vis a vis", I believe, is what you wanted to say.

<comment><USER22> What you didn't see my zero length space?

</comment></comment></comment><comment><USER24> When in doubt, I've usually found it faster to just write the optimized version and never measure.

<comment><USER20> A famous quote by Knuth comes to mind...

Fast code is often unreadable or unmaintainable, software should be written with it's lifespan in mind. That's not an invitation to write slow code, but microoptimizations can be a disatrous temptation (Especially when writing low level code). Compilers are pretty fucking good these days so I think trusting them can be very helpful.

How can you know if you don't measure?

<comment><USER24> I know what compilers do and might not do to code, so they're not the issue. I'm not talking about a x ^= y ^= z here, I'm taking about alternate algorithms and data representations.

</comment></comment></comment><comment><USER25> Surely this statement is not well formed, for to optimise anything, a measure of it is implied.</comment>


Meet the Fed's First Line of Defense Against Cyber Attacks - <AUTHOR> http://www.foreignpolicy.com/articles/2014/04/28/exclusive_meet_the_secret_fed_cyber_security_unit_keeping_trillions_of_dollars_s

<comment><AUTHOR> With all the revelations about the NSA, I thought I'd post an example of the US government using security researchers' skills for good.</comment>


Is Nim unsafe? - <AUTHOR> https://github.com/Araq/Nim/wiki/Unofficial-FAQ#is-nim-unsafe <comment><USER2> The same FAQ has a question "Why is it case/style insensitive?" and an answer giving four reasons, _none_ of which supports "style insensitivity" in any way.

"Style insensitivity" means that in Nim the following identifiers are treated as equivalent: nOpenFiles, no_pen_files, Nope_NFiles. Insertion and removal of underscores, as well as case, is ignored. I hope you weren't expecting to find anything in your codebase using grep.

It seems a reasonable guess that, oh, maybe 99% of people wondering why Nim is "case/style insensitive" are more worried about "style insensitivity" than about mere "case insensitivity". (The other 1% haven't yet learned that Nim is "style insensitive".)

<comment><USER3> Nim also has an experimental feature for a+b * c to parse as (a + b) * c, and for a -b to get parsed as a(-b), because of the whitespace. The documentation itself gives an example of echo (a,b) getting parsed as echo((a,b)).

Nim also allows passing by non-const reference without any indication of such at the call site. Also it has semantic indentation, which is cute and clean- looking but more effort to safely edit than the popular alternatives.

Everything I see in Nim is designed around being clever. Even in the documentation they have clever extensions to BNF syntax that save such precious characters.

<comment><USER4> > and for a -b to get parsed as a(-b)

It almost looks like you're suggesting that `a -b` will be parsed as a*(-b). Let me just clarify, that is not the case. With the 'strongSpaces' feature, `a -b` results in a compile-time error. Without that feature, it works as expected (`a-b`).

> Nim also allows passing by non-const reference without any indication of > such at the call site.

Why is this a problem?

> Also it has semantic indentation, which is cute and clean-looking but more > effort to safely edit than the popular alternatives.

Could you give an example of how exactly semantic indentation makes the language less safe? I have been using Nim (and Python) for years and have not found this to be the case.

<comment><USER3> > With the 'strongSpaces' feature, `a -b` results in a compile-time error.

Unless there's a function named a? It doesn't matter, you're cherry-picking your response.

> Why is this a problem?

Go ahead and tell us what benefits and detriments you're already aware of, having thought about the question, and I'll tell you if you've missed anything. e: I recommend looking at why C++ has non-const reference parameters and how C# handles the problem and considering whether the benefits of this feature could be had without its detriments.

> Could you give an example of how exactly semantic indentation makes the > language less safe?

I said that it was more effort to safely edit. Your question drops the specificity that we're talking about making edits to the code, and also that we're talking about an effort/safety trade-off. Also, it's specifically the kind of semantic indentation found in Python, not (to such a degree) the kind typically found in Haskell. It's easy to find examples: Almost every edit that moves code around takes higher cognitive load than the equivalent done in a language where blocks are explicitly delimited.

<comment><USER5> > Also, it's specifically the kind of semantic indentation found in Python, > not (to such a degree) the kind typically found in Haskell. It's easy to > find examples: Almost every edit that moves code around takes higher > cognitive load than the equivalent done in a language where blocks are > explicitly delimited.

I disagree. Moving code around in Java or C++, pure brace languages, has at least as much cognitive load as Python does, and as most languages do. Are the variables referenced defined in the new scope? do break/continue still function as expected? Are exceptions properly handled and propogated?

The indentation is usually the least of one's worries when moving code around; and at the very least, Python (and I assume Nim, though I hardly have any experience with it) guarantees that the visual and logical code hierarchies match; The fact that they might not is a constant cognitive load in curly brace languages (and a source of bugs if you ignore it).

<comment><USER6> > guarantees that the visual and logical code hierarchies match; The fact that > they might not is a constant cognitive load in curly brace languages (and a > source of bugs if you ignore it).

Well it's a cognitive load if you deal with it manually and the source of bugs if you ignore it, but if you use an automatic indenting program, that solves it once and for all, along with a few other problems.

<comment><USER5> Same is true of Python (and I assume, Nim)

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> > It's not hard to "fix" this issue anyway. Where "fixing" means "pretending > Nim created Ansi C code in the first place" (which it doesn't).

They should probably fix the wording of this -- as an outsider I can't really parse the message conveyed here. If it doesn't create C code then why does the comparison matter? Or is it just about the "ansi" part? But then why does that matter?)

</comment><comment><USER8> When I read between the lines, this section says to me: "Yes, Nim is unsafe, but there are features on the way to help it be more safe."

'not nil' sounds like a great addition to the language, but what if you wanted that to be the default behavior without having to pepper it throughout every variable in your codebase?

<comment><AUTHOR> Well the biggest concern for most is null pointers, so invoking not nil on the pointers would suffice for most

</comment></comment><comment><USER9> > Is Nim unsafe?

Are the binaries hosted on SourceForge?

</comment><comment><USER10> Good old null pointer.</comment>


The Search for the Extra Pedal (2017) - <AUTHOR> https://www.mclaren.com/formula1/inside-the-mtc/mclaren-extra-pedal-3153421/ <comment><USER2> Anyone who has ever driven a tractor will find this article strangely familiar. Tractors generally have two brake pedals, one for each wheel. When driving over roads or hard surfaces those pedals are locked together to keep the vehicle from swerving off the road due to a carelessly applied foot. Off- road these separate brakes are used both to turn tighter corners as well as a poor man's substitute for a differential lock - with diff lock applied the driver has to remember not to rely on differential braking as that just wears out the brakes without achieving anything useful.

I have a few tractors around the farm, all of them have two brake pedals/levers. This even goes for the smallest of them all, an Irus U1200 two- wheel tractor with an 8 hp Hatz diesel.

<comment><USER3> What's the placement? Clutch, left brake, right brake, throttle?

<comment><USER4> Most tractors don't use a pedal for throttle, they use a hand lever. You've seen pilots use a similar throttle control in airplanes in movies. But there are tractors with foot throttles. We had one, the throttle was underneath the two brakes.

The two brake pedals typically look like a single pedal that's been split in half.

<comment><USER3> > Most tractors don't use a pedal for throttle, they use a hand lever. You've > seen pilots use a similar throttle control

Hah, how to tell a city slicker. That makes a ton of sense though. Obviously a tractor is mostly wanting to maintain a slow but constant speed over a bumpy terrain. Having to do that with a foot pedal would be a pain.

At least I know what a PTO is, but only because of reading how dangerous they can be.

</comment></comment></comment></comment><comment><USER5> Presumably due to licensing considerations, the article didn't include actual photo Darren Heath captured at the time of Hakkinen's setup: [https://i.imgur.com/rBJpPrX.jpg](https://i.imgur.com/rBJpPrX.jpg)

It's worth noting that the present driver-adjusted differential locking systems they have effectively replicate much of this behavior, but without nearly as much mid-corner control inputs from the driver. When something that works gets banned, the teams always find another (and often better) way of replicating the effect.

[https://www.f1technical.net/forum/viewtopic.php?t=13671](https://www.f1technical.net/forum/viewtopic.php?t=13671)

The MP4/13 (McLaren's F1 car in 1998) also tested an early version of what we now call KERS (Kinetic Energy Recovery System):

[https://www.motorsportmagazine.com/archive/article/september...](https://www.motorsportmagazine.com/archive/article/september-2008/58/spin- doctors)

[https://www.f1technical.net/f1db/cars/810/mclaren- mp4-13](https://www.f1technical.net/f1db/cars/810/mclaren-mp4-13)

</comment><comment><USER6> It would be great to make this legal again today. With the current fuel restrictions, you couldn't use it a lot or you'd run out of fuel, so you'd have to save it for when you really needed it. Anything that allows a bit more driver-controlled variability between the cars would make for better racing.

</comment><comment><USER3> Clever. Perhaps unappreciated is the athleticism of the drivers:

> It was more work for the drivers, but Coulthard says he adapted quickly: "It > was a switch to choose left and right, and an additional pedal," DC recalls. > "Racing drivers, if they have to sing the Russian national anthem backwards > while juggling grenades, and it gives them a tenth, they would do it! The > competitive animal that you are, nobody would say something is too difficult > if it gave you performance."

I'm a decent stick shift driver and I can't imagine dealing with four pedals. I'm sorta surprised they didn't do it with a pair of handbrakes, like in the XC trial cars mentioned but maybe taking your hand off the wheel is too much of a disadvantage in F1?

<comment><USER7> There was a time when F1 drivers were taking their hand off the wheel in order to change gears, as this famous on-board video of Ayrton Senna at Suzuka [1] in 1989 clearly shows. Having only one hand on the wheel while you're taking a turn at 270 kph is peak vintage Formula 1, it's pure racing. Nowadays most of that raw feel is gone.

[1] [https://youtu.be/Vj6ovrKExJE](https://youtu.be/Vj6ovrKExJE)

<comment><USER8> Modern F1 drivers are now navigating complex multi-level menu systems on their steering wheels with one hand while turning with the other, so I would argue that this talent is still present and visible in a modern race. Not to take away the incredible talent of earlier drivers, however; it's remarkable what they had to do back then.

</comment></comment></comment><comment><USER9> That's fascinating. You don't see old-school imaginative solutions like that in F1 anymore. Now, it's all about tiny bits of aerodynamics at great cost.

<comment><USER10> It is the law of diminishing returns, after 1001 races they have probably exhausted all of such simple but ingenious performance solutions. It is still a shame shame that the other teams were able to get this banned, McLaren might have been a different team today had they kept this competitive advantage.

<comment><USER11> there is still an amazing amount of intrigue around exploring the edges of F1 rules. from just the past 10 years, competitive advantages include double diffusers, exhaust blown diffusers, F-duct, flexible front wings, split turbocharger, tubulent jet injection, 3D printed pistons, blown wheel nuts, microdrilled brake disc vents, Y250 vortex generators, grapefruit juice smelling fuel, MGU-H/MGU-K tricks, and plenty of stuff that we don't know about yet..

<comment><USER10> True, but all these changes cost a lot of money and time.

</comment></comment></comment></comment><comment><USER12> Airplanes have differential braking (in some models there's no other way to steer on the ground, in most the nose or tail wheel is turned by the rudder pedals), and the brakes are controlled by pressing rudder pedals by toes (rather than pushing them in by heels which moves rudder). This reduces the need for pedals from 4 to 2.

Never mind that in a performance landing (such as short field) you use not only brakes but also yoke/stick (2 degrees of freedom) for one hand and throttle for another. The exam standard for commercial pilot is to be able to touch down on a designated 100ft stretch of runway with centerline between main wheels). Add to that your usual wind, turbulence, and thermals on the approach path which make every landing different, and you'd realize that what ground drivers do isn't very exceptional, and that one could train to get proficient in juggling a lot more controls at once:)

</comment><comment><USER13> As the ERS uses motors to regenerate power and assist braking this would probably just be a few lines of code these days. Although ABS not allowed, I think they can use ERS for yaw control under braking (if not someone can correct me?)

</comment><comment><USER14> I thought I read that all wheel drive systems often have something like this today. The expensive ones can control the power ratio to the outside wheels coming from the differential, while some of the cheap ones just apply the brakes.

This is just a manual precursor to those systems. No?

<comment><USER15> Yes, it sounds very similar.

Today, many cars -- even performance cars -- use brakes in place of a differential. In fact, IIRC, McLaren road cars don't have mechanical differentials at all, and they're hardly slow!

Instead of a mechanical device employing a series of clutches that only allows x% more speed or torque or whatever to another wheel, you can (effectively) infinitely vary the amount of power to each wheel by selectively applying brakes. What used to be a crude/cheap traction control hack quickly became 'better' than the real-deal mechanical device.

<comment><USER16> I seem to remember that was an old idea too, but primarily limited by brake technology (cooling, probably).

</comment></comment></comment><comment><USER17> Why not have the brakes actuated with paddles? It'd be more complex and expensive but you wouldn't have to think about your second brake too hard and during turn in you can just squeeze on whatever side works best for maximum grip.

<comment><USER18> If you're talking about why didn't they do it back then? Likely, they wanted to hide it altogether and the steering wheel is more visible than the footwell.

</comment></comment><comment> village-idiot Part of the unspoken story is that Alain Prost's relationship with the FIA during the 1990s was kind of shady.</comment>


Who Turned My Blue State Red? - <AUTHOR> http://www.nytimes.com/2015/11/22/opinion/sunday/who-turned-my-blue-state-red.html <comment><USER2> I find this article contradictory.

The first sentence: Parts of the country that depend on the safety-net programs supported by Democrats are increasingly voting for Republicans who favor shredding that net.

Later: In eastern Kentucky and other former Democratic bastions that have swung Republican in the past several decades, the people who most rely on the safety-net programs secured by Democrats are, by and large, not voting against their own interests by electing Republicans. Rather, they are not voting, period.

So why start the article saying they vote against, to later say they don't vote? Clickbait maybe?

Anyway what I take away from the article is something I have observed for all my years - Pain (economic or other) is a motivator. If you are struggling, you are much more likely to do something about it.

When a person is handed something for free or little effort, they become apathetic towards that thing. I am not saying that this is a rule - it is a generality. A lot of how people behave in that situation depends on a great deal of outside factors. Maturity, life experience, intelligence can all have an affect

When I was young, a friend of mine had his 4 year old car totalled. It was hit on the side, so the damage was limited to the body of the car. He sold it to me for $100 because that's what the junkyard offered him.

It drove great, no alignment problems or any problems at all except it looked bad.

Within 3 weeks I had pushed the engine way past redline (it was a manual) in a short race, and the engine began to fail.

I kept that lesson with me - if I had not done that, I could have driven that car for years to come, saving me money on insurance, gas, etc. Lack of maturity was my biggest problem.

People vote to give themselves something when they are struggling, but after that motivation is removed they will mostly fall back to old habits.

Struggle is a critical part of the human condition. Take that away and you take away a big part of us.

</comment><comment><USER3> The last line of the article seems to imply that it is shame keeping people from voting.

"If fewer people need the safety net to get by, the stigma will fade, and low- income citizens will be more likely to re-engage in their communities — not least by turning out to vote."

I don't see it as an issue of shame, it is more likely to be apathy. What their neighbors saw, the pollsters are also now seeing: the poorest are also the most disengaged. The nurse at the dialysis center looks on in bewilderment as otherwise able-bodied people go in on the government dime. The Democrat leaders look on in bewilderment as otherwise government-dependent areas continue to turn Republican.

What breeds this apathy? I think if you ask why people become dependent on government benefits in the first place, you get the answer: because there are very little opportunities. When the most they can aspire to is surviving day to day, they have little motivation to do anything, much less go vote.

Indeed, the article mentions economic opportunity in the last paragraph as a means to combat this apathy.

"The best way to reduce resentment, though, would be to bring about true economic growth in the areas where the use of government benefits is on the rise, the sort of improvement that is now belatedly being discussed for coal country, including on the presidential campaign trail."

For this, there seem to be two competing approaches. On the Democrats' side, the idea is to fund clean energy, transition the Kentucky and West Virginia economies to clean energy, and help former coal workers transition to working in clean energy. On the Republican side, it's reducing costly regulations on the coal industry, the goal being to make more money available to expand operations and hire more people back. On this issue, it seems voters in Kentucky and West Virginia prefer to stick with the devil they know.</comment>


Any must do courses in the field of Digital Marketing for newbies? - <AUTHOR> I recently graduated and want to take digital marketing as my profession. Any must-do courses that will help me in my career? Please advise! <comment><USER2> Hey there, we have a platform called Jooseph which is basically playlists for learning. You can create and follow collection of links from different resources to learn a subject. If you're interested in we can create a digital marketing module for you, so before paying anything you can discover free resources through the web for learning. Let me now if you're interested in, you can also reach me out at firstname.lastname@example.com

</comment><comment><USER3> If you'd like to learn how to productize your digital marketing services (or any other digital services), I recently wrote a free book: [http://www.productizebook.co](http://www.productizebook.co) \-- Launching a course soon as well :)</comment>


Did a Chinese Hack Kill Canada's Greatest Tech Company? - <AUTHOR> https://www.bloomberg.com/news/features/2020-07-01/did-china-steal-canada-s-edge-in-5g-from-nortel <comment><USER2> This is trying to pass symptoms off as causes.

Nortel did not need anyone to self-destruct. Examples of mismanagement pepper the article, and in cellular products were not selling well.</comment>


Designing a Quantum Computing Board Game - <AUTHOR> https://medium.com/@MaryamAshoori/designing-a-quantum-computing-board-game-de4a450cad8c?source=linkShare-82a8964e3ad2-1531274721 <comment><USER2> Now this is the way to make an educational board game: Equal emphasis on getting both the principles and the gameplay right. Enjoyable as learning may be on its own, an unbalanced or un-engaging game can take the fun out of what it's intended to help with.

I'm also impressed with the visual and typographic design of Entanglion's game components. I was surprised not to see a Kickstarter for a professionally- manufactured box set.

<comment><USER3> Wouldn't a professionally manufactured set infringe the license terms? From what I can see, the game and it's assets are released under Creative Commons Attribution-NonCommercial-ShareAlike

</comment></comment><comment><USER4> I signed up for Entaglion while attending IBM Q conference last year (they were sending out the game to interested participants), and I must say it's awesome. Thanks a bunch for creating it, ever since it arrived I had loads of fun! It's proven itself useful especially in making my friends more familiar with the world of quantum computing :)

</comment><comment><USER5> In a related vein, now that there's qbits to play with on the cloud, there also rudimentary games available that use _actual_ quantum computing! [https://medium.com/@decodoku/introducing-the-worlds-first- ga...](https://medium.com/@decodoku/introducing-the-worlds-first-game-for-a- quantum-computer-50640e3c22e4)

It's purely a novelty, of course. But a cool one.

</comment><comment><USER6> Great to see more stuff like this! I really believe in games for quantum pedagogy. See also [https://en.wikipedia.org/wiki/Quantum_tic-tac- toe](https://en.wikipedia.org/wiki/Quantum_tic-tac-toe)

and some computer games [http://quantumgame.io/](http://quantumgame.io/)

[http://www.tropic.org.uk/~crispin/quantum/](http://www.tropic.org.uk/~crispin/quantum/)

(full disclosure, last one is mine)

</comment><comment><USER7> > we actually implemented a simulator for the game and AI players who could > play it together.

Wow. If they got tired of quantum they could go into AI. AI good enough to simulate how hard a game is, is impressive.

<comment><USER8> I think the game creators are actually HCI+AI research scientists at IBM Research.

</comment></comment><comment><USER9> I wish I could just buy this. I'm not motivated enough to make it and I'd be disappointed with the quality of a home made version.

<comment><USER10> Take the files to office max and print on heavy cardstock. It makes very reasonable quality games. I design board games as a hobby and this is what I do. 100s of games played and good enough quality to pitch to publishers.</comment></comment>


BareMetal: A 64-bit OS in 16kb - <AUTHOR> http://www.returninfinity.com/baremetal.html

<comment><USER2> "BareMetal is ready... Current plans call for the ability to write data back to the disk."

Curious definition of "ready." :)

<comment><USER3> Depends what you're doing. Netboot, receive compute tasks from the network, complete them and send them back, you don't even need a disk :-)

<comment><USER4> Good plan, but:

"Future versions will call for ... network support"

:)

</comment></comment></comment><comment><USER5> My Favorite "Bare Bones" System - Starting with Logic Gates, then assembler, then virtual machine, a language, compiler, and finally, operating system as a very high level construct:

[http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&...](http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10218)

</comment><comment><AUTHOR> There's also MenuetOS (<http://www.menuetos.net/>) if you've never seen it before. It's kind of like a Live CD, except it's written in assembly and fits on a 1.44MB floppy (if you remember what those are!)

</comment><comment><USER6> Shameless plug: if you're looking for something a little more full-featured but maybe not quite as small, take a look at Kitten <https://software.sandia.gov/trac/kitten>. It's still a minimal OS (LWK: lightweight kernel), but it has thinks like.. disks and networking.

</comment><comment><USER7> Is it just me, or is a swath of source missing? The Pure64 secondary loader which does a lot of interesting tasks to do with understanding the processor appears to be binary only.

</comment><comment><USER8> Another great education OS is xv6 from MIT

<http://pdos.csail.mit.edu/6.828/2009/xv6-book/index.html>

</comment><comment><USER9> That's really cool. I can't imagine ever having any use for it as software personally but I it's small enough that I just read a large chunk of the code in not too much time. Awesome :)

</comment><comment><USER10> Well done - I love projects like this and think it has great potential both as a utility and a teaching tool: particularly impressed with the little 64-bit ASM tutorial.

Great website too...but it's missing a donation button!

</comment><comment><USER11> I think I found your design inspiration for that website! <http://www.discoapp.com/>

<comment><USER12> Is that your site or was it just something you remembered? If it is your site, I have to tell you the logo/icon is stellar.

</comment></comment><comment><USER13> This is one of those times where I wish I had a real laptop instead of a netbook. This looks like a lot of fun (I've never taken the time to learn assembly, and I've never written a driver or compiler).

Ahh well.

<comment><USER14> Try Bochs. It will be more than fast enough for something like this.

</comment></comment><comment><USER15> When trying to download the VM (link at bottom of BareMetal page), I get a virus warning ("probably a variant of Win32/Genetik") from ESET Nod32 (my antivirus software). Anyone else get this or have any problems?

<comment><USER16> I doubt that a 16k file with an OS in it manages to accommodate a virus too.

It's probably heuristics, AV software is very picky about stuff that does booting a system or have very optimized code. You see this kind of alert in the demo scene quite often too, because AV also don't like their packing algorithms.

</comment></comment><comment><USER17> The problem with these approaches are that they're inflexible. Most parts are hardcoded closing the way for further development.

</comment><comment><USER18> I'd love to see an educational micro-kernel OS, something like L4.

<comment><USER19> How about the infamous Minix? <http://www.minix3.org/>

</comment></comment><comment><USER20> out of subject.. but, do you know what is the theme used in screenshot?</comment>


Phones need 'bed mode' to protect sleep - <AUTHOR> http://www.bbc.com/news/health-34744859 <comment><USER2> For Linux users I can highly recommend Redshift[1]. The color temperature settings seem to differ some from f.lux but everything else works great!

[1] [http://jonls.dk/redshift/](http://jonls.dk/redshift/)

<comment><USER3> Not just for Linux users: If you are using f.lux on windows but wish that you could control the temperate on demand (rather than it being automatic according to the current time) switch to Redshift and don't look back.

</comment></comment><comment><USER4> And yet Apple recently forced f.lux to take down the sideloaded version of their iOS app despite the fact that they have no public APIs available to do what f.lux does.

See here: [https://justgetflux.com/sideload/#notanymore](https://justgetflux.com/sideload/#notanymore)

HN Posting: [https://news.ycombinator.com/item?id=10556375](https://news.ycombinator.com/item?id=10556375)

<comment><USER5> I haven't done any mobile development, so forgive my ignorance. But the concept of a program not being "allowed" on my device is bizarre to me.

<comment><USER6> It's not that the program isn't allowed. It's that the program uses unpublished API's which Apple doesn't allow.

<comment><USER5> I see the difference here now. Thanks!

</comment></comment></comment></comment><comment><USER7> When reading about circadian light it helps to remember that the actual biological research is still a bit thin. There are a couple of studies out there that show that light of other wavelengths reduces the effect of the blue light on melatonin. Since the problem is normally caused by the bright white areas on the screen it is possible that all that is required is to turn down the overall brightness at night.

Incidentally, this effect might explain why people complain that typical office lighting isn't bright enough to cause sufficient melatonin suppression during the day.

<comment><USER8> This is the obvious change immediately made by anyone whose health is affected. If the lowest level of brightness were sufficient, users would not need to seek out apps like f.lux.

</comment></comment><comment><USER9> People get addicted to their phones to the point that it disrupts their sleep and harms their health. A bed mode is not going to change that. People need to recognise the damage their habits are doing and work to change them.

<comment><USER10> Actually a bed mode will make a substantial difference.

Looking at phones or laptops or whatever screens at nighttime suppresses melatonin, which leads to people not feeling sleepy when they should, which makes them much more likely to continue looking at their screen than if they became as tired as normal.

It's certainly possible to stay up doing something without blue light (e.g. reading by candlelight or a dim incandescent flashlight), but blue light makes a huge difference, and actively fights people's ability to exercise self control.

Working to change habits is all well and good, but instead of telling someone who habitually binges on candy and cookies to stop eating any snacks at all, period, it would be a more successful intervention to take the candy and cookies away and fill their refrigerator with carrot sticks.

<comment><USER9> In my experience, using a screen colour app just encourages me to use my phone more not less. Even with these apps a phone will still emit a large amount of blue light and having the light source so close to my face I still notice it disrupts my sleep.

If you believe using your phone late at night is harmful to you at all then why continue to maintain a that behaviour? Wouldn't it be much more beneficial to your health to avoid screens altogether at night? I'm not saying that it is easy but I believe it's a good healthy goal to aim for just like getting exercise and eating well.

To your point about unhealthy eating habits I totally agree. I just don't see phone addiction normally talked about as often as diet and exercise which is why I wanted to mention it.

<comment><USER11> _If you believe using your phone late at night is harmful to you at all then why continue to maintain a that behaviour?_

Paraphrasing from one of your previous posts, "if you really have to question every action that might be harmful then you would never go outside, put anything in your mouth, go to the bathroom etc. Your question really only makes sense when considering activities that have a relatively high risk of harm in which case the answer has to come down to two things. Firstly how harmful is this activity? And secondly, how much harm am I willing to take?"

If a bed mode is enough to make the disruption to one's sleep negligible, why not use the phone late at night?

</comment></comment></comment></comment><comment><USER12> While I do think my Mac is overly blue, I also think that f.lux is ridiculously yellow. I've turned down the yellowness considerably compared to the defaults, and still find myself turning it off in the evening, because suddenly everything becomes washy yellow.

<comment><USER10> If you allow your eyes to adapt, the yellowness really isn't a big deal, unless you're doing something color sensitive like making art. Just stop worrying about precisely what colors are on screen.

Even if you're casually looking at photographs, watching a television show, or playing a game, your eyes can compensate pretty well for a significant reduction in the amount of blue light, and you can have a perfectly acceptable experience.

Note, you'll also want to dim or turn off other lights at night. In particular white LEDs of CCT ≥4000K are terrible at night, both wrecking night vision and disrupting sleep rhythm.

If you're in an otherwise dark room, you can turn your display brightness as low as it will go and turn f.lux to its orangest possible setting and still browse the web, answer emails, write code, etc. perfectly fine. At such an extreme setting you might not be able to effectively enjoy photographs or movies anymore, but maybe right before bed isn't the best time to look at photographs anyway.

<comment><USER13> I find f.lux unusable for quite a few TV shows on Netflix on my Macbook. I don't have an issue with the colours, but it introduces artefacts in very bright areas which are really annoying. Sure I probably shouldn't watch Netflix before bed, and I don't when I need to be up early etc., and I probably could fiddle with settings to fix it - but it is noticeable and annoying.

<comment><USER10> Yeah, it somehow screws with full screen QuickTime video playback. I think in those cases the video player is trying to bypass some of the standard OS display processing and send data straight to the screen to save power, or similar.

I've found VLC doesn't have an issue, but I'm not sure if you could use VLC to play Netflix videos.

</comment></comment></comment></comment><comment><USER14> Or people just need to put the phone down before going to sleep. Every non- infantile responsible adult is capable of that.

How hard can it be ?

<comment><USER15> You did not read the article... It's not about putting down the phone, it's about the light it emits.

<comment><USER16> Maybe he did. The blue tones are no problem if you simply don't look at the damn thing all evening.

<comment><USER8> Or if you install software to control color temperature.

</comment></comment></comment></comment><comment><USER17> Or you could just put the phone/tablet/computer aside an hour or two before bedtime. It's probably not a popular solution, people get defensive when you suggest they put their phone away.

</comment><comment><USER18> Anybody know if f.lux is working on an Android version? Their FAQ is mute on the issue.

<comment><USER19> There is something like f.lux for Android. It's called Twilight.

<comment><USER20> Twilight seems less thorough than f.lux and more like a simple filter. When f.luxs runs on my desktop, the blacks are still black. On Twilight, they get a red tint to them.

</comment></comment></comment><comment><USER21> For those wearing glasses, you can opt for special coating that filters some of the blue light out.

The one I got was ~$40 option when I last ordered new glasses, and was branded "digital protection glasses" and "Kodak BlueReflect".

<comment><USER10> Orange safety glasses entirely block those wavelengths. This kind of thing: [http://amzn.com/B003OBZ64M/](http://amzn.com/B003OBZ64M/)

If looking through your glasses doesn't make everything look significantly yellower/oranger than usual when you first put them on, then it's not blocking too much blue light. You can try to find a spec sheet with the spectral transmission distribution to get a full idea.

</comment></comment><comment><USER22> My brain must be wired up differently, but the best way for me to fall asleep is by watching youtube videos on my iPad. When I'm sufficiently tired, it's a matter of minutes before I'm asleep.

<comment><USER23> I believe that discovery was made decades ago, given the stories I've come across of people who fell asleep to 'The Late Show' with Carson, back when that was the last broadcast of the day.

Ahh, here are two links which mention those days: [http://www.salon.com/2014/02/18/how_jimmy_fallon_and_the_roo...](http://www.salon.com/2014/02/18/how_jimmy_fallon_and_the_roots_brought_hip_hop_to_late_night/) and [https://www.washingtonpost.com/news/arts-and- entertainment/w...](https://www.washingtonpost.com/news/arts-and- entertainment/wp/2015/08/12/finally-nightly-johnny-carson-tonight-show- episodes-are-coming-to-tv-but-only-for-some-people/) .

</comment></comment><comment><USER24> I don't understand why Google hasn't implemented this yet. It's easy to do that and has a huge value. I always had to root my phone just to do this.

<comment><USER25> Dictating what is "easy to do" is an insult to software producers everywhere. If you'd like to know more about how "simple" things can take lots of effort to deploy in heavily-used production software, consider reading Raymond Chen's Old New Thing blog for a while.

</comment></comment><comment><USER26> The Do Not Disturb feature with defined DND times goes a long way on iOS. Definitely recommend it, and yes, receiving notifications at 2AM can be a total pain.

</comment><comment><USER27> It's called the power off button?

Seriously, what is wrong with people, turn the thing off.

Future "news": Food needs to stop being so tasty so people don't eat too much.

<comment><USER28> I and most of my acquaintances no longer have a traditional landline phone. My smartphone is the only way to contact me in an emergency. If friends or family need to reach me to extricate them from a bad situation or come to the hospital, etc., I want to be reachable. It's only happened a few times in my life, thankfully, but I don't like the idea of being completely unreachable until I wake up and turn my phone back on.

That said, I could turn off wifi and cellular data, but that's one more thing to remember to do every night. I suppose if you find the temptation overwhelming, it could be worth it though.

My point is just that turning off the phone is not as simple of a decision as you make it sound.

<comment><USER27> touching "airplane mode" is too hard for you?

it's a pull down, one click if you set it up right

also, some phones with 5.1 or 6.0 can change modes automatically depending on time of day and can turn off mobile data and wifi - you can leave voice enabled for "emergencies"

<comment><USER29> Are you claiming that airplane mode will let people receive emergency calls? I am pretty sure that is not the case.

<comment><USER27> Sorry I had two thoughts in that last post.

If you need emergency calls, you can just turn off wifi and mobile data which leaves voice (and I think sms) intact.

<comment><USER28> Did you read my comment? That's exactly what I said, right? You can turn off wifi and cellular data to just get calls (and sms).

Your comment acted like turning off the phone was the obvious solution everybody was missing, and my point was that it's more complicated.

</comment></comment></comment></comment></comment></comment><comment><USER30> Isn't that the "do not disturb" settings in iOS?

<comment><USER31> No the article is talking about the blue light affecting hormone production. "Do not disturb" does nothing for that.</comment></comment>


More dot-coms are embracing the idea of drinking at work - <AUTHOR> http://seattletimes.nwsource.com/html/businesstechnology/2014528907_drinkingatwork20.html

<comment><USER2> >"Many people can work after one beer, but I doubt many people can do serious knowledge work very productively after four or five."

This might just be because I'm a student, but I can't remember the last time I got any serious coding done before five in the afternoon.

<comment><USER3> The issue is inebriation, not time of day ....

<comment><USER2> Whoops, I totally misread that.

</comment></comment></comment><comment><USER4> This kind of behavior will last until somebody has an accident on the drive home. Once the company is sued for "providing alcohol", it will be too risky to continue. Folks outside the US might be sensible, but inside... No.

<comment><USER3> This happened during the dot com era. Beer busts, Friday afternoons initially, but expanding into other time slots, were the norm. Then HR and legal started looking at liability issues and the frequency of such events dropped off. We'd go out to local bars instead, and there the workday ended.

Companies do a lot to keep employees at, or near, their desks to get additional work out of them. Some of these benefits appear to work well, but I have doubts about providing alcohol. Productivity drops, inhibitions drop, liability rises. Better to say "Ok, time to go home, or at least elsewhere."

</comment></comment><comment><USER5> This brings to mind only one thing, <http://xkcd.com/323/></comment>


Tesla Model S P100DL Motor Trend all-time world record 60mph in 2.27s - <AUTHOR> https://twitter.com/elonmusk/status/828981873086865410 <comment><USER2> One thing I wonder is why Top Gear (the old one) / Grand Tour never has the tesla in it's episodes or drag races?

Especially the latest episode of Grand Tour did some kind of road test with a hybrid car and made a laughing stock of it. And they laughed about the "future of cars" if it would be like that (they used some ridiculous bmw hybrid). Driving very slow to preserve electricity and long charge times every 40 miles or something like that. Why didn't they test with a Tesla to give a realistic picture of "the future"?

<comment><USER3> They did a road trip in a BMW i3 which is basically a commute car. And their point does stand - if you like cars and road trips enough to watch GT or Top Gear you probably care a lot about being able to make road trips.

<comment><USER4> As a former Tesla owner and current i3 owner, I really don't understand why the concept of the road trip is constantly held up as the standard by which electric cars should be judged. I really don't understand why people are optimizing for their once a year use case rather than their daily use case. Unless it's your lifestyle, road trips are the exception, not the rule.

For my family, it means owning my i3 for commuting and my wife's Toyota Sienna for family trips. For others, it could mean renting a car for a week or two when you take a long road trip.

As a fun note: As a BMW i3 owner, BWM offers me up to 2 weeks per year of complimentary gasoline car rental for road trips.

<comment><USER5> If you own two cars, isn't it actually you who have arranged your lifestyle in order to accommodate the electric one? And I feel kinda sad for anyone who feels that going more than 60 miles from home happens only once a year.

<comment><USER4> My comment was only meant to discuss people optimizing for the edge case (road trips) vs the common case (daily driving). There will always be people for whom long-distance driving is not the edge case.

There's a pretty big assumption that travel beyond 60 miles (or 110 in the case of my i3) requires a car. There are a lot of ways to travel that don't involve driving. I travel frequently; it's almost always by air.

</comment></comment></comment></comment></comment><comment><USER6> This includes supercars with $1M price tags right? Honest question: why aren't all supercars electric if this is possible? I get that there are other parameters important for driving fast, like handling, but won't a million- dollar electric Bugatti always be faster than a gas one?

<comment><USER7> Right now a Tesla will overheat if you run it at top speed consistently. Electric is unmatched for instant torque, but the current battery technology makes electric unsuitable for sustained high speed.

As far as practical power, electric is far more useful than gasoline for aggressive city and interstate driving (unless you have a long stretch of open pavement). The lack of transmission gives a distinct advantage in surprise- passing a gasoline sports car. The thrill of instant power cannot be overstated!

<comment><USER8> Actually, how does the tesla cools down? I have seen in pictures of the battery that they have pipes connected, does those pipes goes to a heat radiator? I'm curious now.

<comment><USER9> In addition to the batteries, the 3-phase IGBT inverter is watercooled with the aid of a triangular waterblock (each phase corresponds to one side of the block). [1]

[1] [http://www.pointthepower.com/wp- content/uploads/2015/09/Scre...](http://www.pointthepower.com/wp- content/uploads/2015/09/Screen-shot-2015-07-11-at-6.54.06-AM.png)

<comment><USER8> That photo of the inverter is beautiful, as I child I was passionated about electronics, I made some projects like audio amplifier and FM transmitter, never thought we were going to have electronics in cars at this level. Now I wonder how reliable are Teslas, what are the parts that are prone to fail. Going to do a research on youtube right now :)

<comment><USER9> In theory, properly sized and protected from motor transienst, the power electronics should last the lifetime of the car (and then some). Electric locomotives and EMUs have been using IGBTs for decades in similar arrangements with active cooling.

</comment></comment></comment></comment></comment></comment><comment><USER9> But can it complete a lap around the track without going into limp mode? High- power bursts are nice and all but sustained performance is important too.

<comment><USER10> This is admittedly an old article so hopefully the engineering has improved since then, but to the best of my knowledge it's still an issue. Maybe they made significant improvements to the battery pack in the P100 though.

[http://insideevs.com/expected-tesla-model-s-fails-lap- nurbur...](http://insideevs.com/expected-tesla-model-s-fails-lap-nurburgring- full-power-video/)

edit: a quick Google of forums and articles suggests the car has a problem overheating when you drive it above ~100 MPH

[http://www.teslarati.com/tesla-model-s-formula-1-racing- circ...](http://www.teslarati.com/tesla-model-s-formula-1-racing-circuit/)

[https://forums.tesla.com/forum/forums/p90d-overheating](https://forums.tesla.com/forum/forums/p90d-overheating)

</comment></comment><comment><USER11> I wonder a little about anyone who reads about a car that will do the quarter mile in 10.5 seconds at 125 mph and thinks "that thing is all hype, it's not fast enough for me."

If your plans for the day somehow involve a crash helmet and the Mulsanne Straight, yeah, you're going to find it a little limiting and it's the wrong tool for the job. But seriously, it's a 4-door sedan...

<comment><USER12> It also notably has overheat protections that don't allow for sustained acceleration, which makes it far less useful on a track day.

<comment><USER11> I can see taking it to the drag strip for a little fun, but a real track day? Does anybody do that with a big sedan like this? Just curious, I haven't seen enough of those to really have an opinion here.</comment></comment></comment>