yes. Many people just don't know this about Apple. In the mid to late 80's Apple was well known for being extremely obtuse about low level programming information and tools for the Mac. Not only did they refuse to give out development tools for free, but they also refused to allow others to have enough information to develop their own.. at any price.
Apple has been asshats since the first Mac, but somehow in the 90's they managed to turn popular opinion around while remaining asshats.
The point is that writing shifts instead of multiplications is an optimization(-attempt). Whether it fails to improve the result because the compiler would have made the substitution automatically or because there is no performance difference between the two is a moot point.
You seem to be missing the point. There are plenty of compilers that still insist on replacing constant multiplications with shifts (you have it backwards!) when it is no longer optimal to do so. It is, in fact, suboptimal to do so.
The great great whatever grandparent was completely wrong about using shifts instead of multiplication, AND THATS THE POINT. HES WRONG, AND MOST COMPILERS ARE ALSO WRONG.
Only the activists search for porn on the Internet.
I find porn on the internet by clicking on banner ads until I get to a porn site. Its like thw owl in the lollipop... one... two... THREE! It takes THREE banner ad clicks to get to porn on the internet!
..and there are plenty of reasons to write your own versions of what are otherwise simple standard library functions. The xor swap is a good example, but also things like sorting come to mind.
Sure, that standard library sort is a good general purpose sort but thats also its weakness.. you can literally always do it faster (often significantly.. really), or always require less memory overhead (as little as zero)
I comment my data. The code is just the interactions between the data. Adding new interactions does not require that old interactions be documented.. it requires that the data be documented.
Compilers are good at the tedium of large-scale optimizations such as constant propagation, but are still not up to snuff when it comes to producing tight loops (the place where it usually matters most.) This is why the fastest workhorse libraries are written in assembler (such as encryption, compression, and so forth)
What are you talking about? There are PLENTY of reasons to do bitwise operations on signed values.
In fact some very strong bitwise techniques *require* twos-complement treatment, and Donald Knuth has a new book out for people like you who are still ignorant of the outstanding things thats two-complement can do for you. The Art of Computer Programming, Volume 4.
Re:One person's myth is another person's fact.
on
Myths About Code Comments
·
· Score: 2, Informative
Shifting is no longer considered superior to multiplication on x86 because shifting has flag dependencies that multiplication does not have. The P3 was the last processor to favor shifting over multiplication (actually.. not sure about the Atom)
specifically:
mul or imul always alters the entire flags register, while shl or sal only alters part of the flags register. This partial update to the flags register breaks out-of-order execution and register renaming (creating a dependency on the state of the flags register prior to the shift), among some other negative effects.
div and idiv are still dogs and should be avoided.
For awhile there it was quite difficult to get a C compiler to NOT emit shifts in place of constant multiplications, which became an optimization nightmare for those of us who cared, because the compilers were outright and utterly wrong.
The protection of copyright is not an inalienable human right. The default condition is no protection at all, which we call Public Domain.
The purpose of copyright is in fact to protect works for a term so that the author may profit, an incentive to produce.
But what was originally intended was to release those works back into the default condition after a period of time, because it was felt (and still is by many) that we are all better off with a rich public domain.
This doesnt screw the little guy. Copyrights currently screw everybody.
Thinking about this, suppose a good compromise is to allow unlimited extensions but to charge higher and higher prices as the length increases.
Perhaps 7 years automatic for free, with the next 7 years costing $1,000, and the next costing $10,000, and the next costing $100,000, then $1,000,000, and so forth. A 10x increase for each extension.
..with the proceeds of extensions going towards public education.
So what you are saying is that when he said Republicans he was really being as disingenuous as possible, lumping in Blue Dog Democrats with the term Republicans?
Even when its the Democrats fault, its really the Republicans fault! Gotcha. Can't own up to the Democrats bad policies.. instead gotta blame "them Republicans"
That depends. I'll create a hypothetical to make the point.
Your hypothetical is nothing like this case, tho. We are obviously not talking about some great revolution or some secretive conspiracy. We are talking about information that WILL become public, and in this case a specific date chosen and it wasnt even going to be that far in the future.
We are not talking about a case where someone faced a moral dilemma between choosing "the greater good" over official policy. This is a case of a blatant disregard for policy, and is most definitely not a case where such a blatant disregard scores morality points. The only points it scores is "+1 we got a security breach"
I dont like forced automobile liability insurance either. At least my State (and probably most) allows you to opt out if you have sufficient financial means to cover your own ass, and of course you have the option to arrange your life such that you can opt out of driving altogether... using mass transit or simply living close to where you need to go.. avoiding the issue entirely.
Two wrongs definitely don't make a right. Requiring everyone to buy into a health insurance plan is absolutely positively wrong. It goes against liberty and free will, and now that I am thinking about it I wonder how this requirement will effect people who choose to live "off the grid" (producing their own food, clothing, and shelter..)
Another point is that it served no real purpose to keep this a secret anyway. Someone "sworn to keep the secret" realized this and acted accordingly instead of being a mindless drone.
Thats not really a point, but instead an appeal.
Do you honestly think that (for example) a secretaries or clerks opinion should factor into when secrecy rules should be followed and when they shouldn't? Really? Just because they "realized" that there was no purpose for secrecy? Really?
What do the republicans have to do with this? The democrats have the majority. They can pass literally anything that they can all agree on. Apparently the facts of the situations are different from your interpretation, because obviously the democrats cannot all agree on a single payer system.
You are arguing that millions of people who can't readily afford medical insurance should go without because..
Strawman much? I didn't argue any such thing. I argued that people shouldn't be forced to buy insurance, and this goes DOUBLY for those that can't afford it.
Except people who choose the 'right' to not pay for health care insurance still show up to doctors offices and hospital emergency wards demanding to be fixed without the ability to actually pay.
You seem to think that everybody who would choose not to pay for health insurance would not have the ability to pay for health care.
Somebody needs to teach you what the insurance racket actually is. Its legalized gambling, and might soon to be required-be-law gambling. Fuck you are all your asshat liberal friends who want to force me to place wagers.
I discovered that they are nowhere near as cheap as prepaid cellphone plans for my usage pattern. I was paying AT&T $30/month for the basic land-line plan. Now I pay $20 every 3 months for 150 minutes (60 minute card with lifetime double minute bonus plus a an additional 30 minutes via promotional code), have an ever increasing pool of unused minutes, and have more more phone features than I ever did with AT&T's basic plan (caller ID, voice mail, call anywhere in the U.S. without getting raped..)
I think that we can arrange it. I would definitely prefer to have my tax dollar spent making something cool like that happen, rather than spend it on bailouts or diverting it directly into the pockets of the health insurance industry.
yes. Many people just don't know this about Apple. In the mid to late 80's Apple was well known for being extremely obtuse about low level programming information and tools for the Mac. Not only did they refuse to give out development tools for free, but they also refused to allow others to have enough information to develop their own .. at any price.
Apple has been asshats since the first Mac, but somehow in the 90's they managed to turn popular opinion around while remaining asshats.
The actual point however is that you should generally write what you mean, not what you think is fastest.
x *= 2
vs
x += x
vs
x
They all mean the same thing.
The point is that writing shifts instead of multiplications is an optimization(-attempt). Whether it fails to improve the result because the compiler would have made the substitution automatically or because there is no performance difference between the two is a moot point.
You seem to be missing the point. There are plenty of compilers that still insist on replacing constant multiplications with shifts (you have it backwards!) when it is no longer optimal to do so. It is, in fact, suboptimal to do so.
The great great whatever grandparent was completely wrong about using shifts instead of multiplication, AND THATS THE POINT. HES WRONG, AND MOST COMPILERS ARE ALSO WRONG.
...or are worried that their crappy compiler is still producing code optimized for architectures a decade or more out of date.
I would not be surprised if multiplication were no worse than equal to shifts on ARM as well.
Only the activists search for porn on the Internet.
I find porn on the internet by clicking on banner ads until I get to a porn site. Its like thw owl in the lollipop... one... two... THREE! It takes THREE banner ad clicks to get to porn on the internet!
..and there are plenty of reasons to write your own versions of what are otherwise simple standard library functions. The xor swap is a good example, but also things like sorting come to mind.
Sure, that standard library sort is a good general purpose sort but thats also its weakness.. you can literally always do it faster (often significantly.. really), or always require less memory overhead (as little as zero)
I comment my data. The code is just the interactions between the data. Adding new interactions does not require that old interactions be documented.. it requires that the data be documented.
Unless you use a really crappy compiler, the compiler will turn a multiplication into a bit-shift for you.
Only crappy compilers still turn multiplications into bit-shifts, because its simply not superior to multiplication on AMD64/Core2.
You are living in the past, and so are most compilers.
Compilers are good at the tedium of large-scale optimizations such as constant propagation, but are still not up to snuff when it comes to producing tight loops (the place where it usually matters most.) This is why the fastest workhorse libraries are written in assembler (such as encryption, compression, and so forth)
What are you talking about? There are PLENTY of reasons to do bitwise operations on signed values.
In fact some very strong bitwise techniques *require* twos-complement treatment, and Donald Knuth has a new book out for people like you who are still ignorant of the outstanding things thats two-complement can do for you. The Art of Computer Programming, Volume 4.
Shifting is no longer considered superior to multiplication on x86 because shifting has flag dependencies that multiplication does not have. The P3 was the last processor to favor shifting over multiplication (actually.. not sure about the Atom)
specifically:
mul or imul always alters the entire flags register, while shl or sal only alters part of the flags register. This partial update to the flags register breaks out-of-order execution and register renaming (creating a dependency on the state of the flags register prior to the shift), among some other negative effects.
div and idiv are still dogs and should be avoided.
For awhile there it was quite difficult to get a C compiler to NOT emit shifts in place of constant multiplications, which became an optimization nightmare for those of us who cared, because the compilers were outright and utterly wrong.
I think that you are completely off-base here.
The protection of copyright is not an inalienable human right. The default condition is no protection at all, which we call Public Domain.
The purpose of copyright is in fact to protect works for a term so that the author may profit, an incentive to produce.
But what was originally intended was to release those works back into the default condition after a period of time, because it was felt (and still is by many) that we are all better off with a rich public domain.
This doesnt screw the little guy. Copyrights currently screw everybody.
It would thus cost $1000 to get the original unextended 14 years.
It would cost $111,000 to attain the 28 years "legacy length"
49 years would cost $111,111,000.. and some copyrights would be extended this long.
only a couple would ever be extended to 63 years ($11,111,111,000)
It is unlikely that any would be extended to 77 years (over a trillion dollars)
. As GP said, someone realized this and leaked it.
We don't know what motivated them. Its certainly a good excuse, in your book, for not sticking with policy.. I guess
Thinking about this, suppose a good compromise is to allow unlimited extensions but to charge higher and higher prices as the length increases.
..with the proceeds of extensions going towards public education.
Perhaps 7 years automatic for free, with the next 7 years costing $1,000, and the next costing $10,000, and the next costing $100,000, then $1,000,000, and so forth. A 10x increase for each extension.
So what you are saying is that when he said Republicans he was really being as disingenuous as possible, lumping in Blue Dog Democrats with the term Republicans?
Even when its the Democrats fault, its really the Republicans fault! Gotcha. Can't own up to the Democrats bad policies.. instead gotta blame "them Republicans"
That depends. I'll create a hypothetical to make the point.
Your hypothetical is nothing like this case, tho. We are obviously not talking about some great revolution or some secretive conspiracy. We are talking about information that WILL become public, and in this case a specific date chosen and it wasnt even going to be that far in the future.
We are not talking about a case where someone faced a moral dilemma between choosing "the greater good" over official policy. This is a case of a blatant disregard for policy, and is most definitely not a case where such a blatant disregard scores morality points. The only points it scores is "+1 we got a security breach"
I dont like forced automobile liability insurance either. At least my State (and probably most) allows you to opt out if you have sufficient financial means to cover your own ass, and of course you have the option to arrange your life such that you can opt out of driving altogether... using mass transit or simply living close to where you need to go.. avoiding the issue entirely.
Two wrongs definitely don't make a right. Requiring everyone to buy into a health insurance plan is absolutely positively wrong. It goes against liberty and free will, and now that I am thinking about it I wonder how this requirement will effect people who choose to live "off the grid" (producing their own food, clothing, and shelter..)
Another point is that it served no real purpose to keep this a secret anyway. Someone "sworn to keep the secret" realized this and acted accordingly instead of being a mindless drone.
Thats not really a point, but instead an appeal.
Do you honestly think that (for example) a secretaries or clerks opinion should factor into when secrecy rules should be followed and when they shouldn't? Really? Just because they "realized" that there was no purpose for secrecy? Really?
What do the republicans have to do with this? The democrats have the majority. They can pass literally anything that they can all agree on. Apparently the facts of the situations are different from your interpretation, because obviously the democrats cannot all agree on a single payer system.
You are arguing that millions of people who can't readily afford medical insurance should go without because..
Strawman much? I didn't argue any such thing. I argued that people shouldn't be forced to buy insurance, and this goes DOUBLY for those that can't afford it.
You liberals really are fucking stupid.
You are missing the point.
They were trying to keep something a secret, and then someone sworn to keep that secret, leaked it. That is absolutely a cause for concern.
Except people who choose the 'right' to not pay for health care insurance still show up to doctors offices and hospital emergency wards demanding to be fixed without the ability to actually pay.
You seem to think that everybody who would choose not to pay for health insurance would not have the ability to pay for health care.
Somebody needs to teach you what the insurance racket actually is. Its legalized gambling, and might soon to be required-be-law gambling. Fuck you are all your asshat liberal friends who want to force me to place wagers.
Keep in mind that any sort of leaks prior to implementing them is definitely cause for concern.
Plus land lines are dirt cheap.
I discovered that they are nowhere near as cheap as prepaid cellphone plans for my usage pattern. I was paying AT&T $30/month for the basic land-line plan. Now I pay $20 every 3 months for 150 minutes (60 minute card with lifetime double minute bonus plus a an additional 30 minutes via promotional code), have an ever increasing pool of unused minutes, and have more more phone features than I ever did with AT&T's basic plan (caller ID, voice mail, call anywhere in the U.S. without getting raped..)
How about a 100% chance of it hitting the moon.
I think that we can arrange it. I would definitely prefer to have my tax dollar spent making something cool like that happen, rather than spend it on bailouts or diverting it directly into the pockets of the health insurance industry.