From: Skybuck Flying on 27 May 2010 12:06 "Seebs" <usenet-nospam(a)seebs.net> wrote in message news:slrnhvt42m.72l.usenet-nospam(a)guild.seebs.net... > On 2010-05-27, Skybuck Flying <IntoTheFuture(a)hotmail.com> wrote: >> So "shr 32" and "shl 32" could result in garbarge ?! > > On many systems. > >> That is pretty shitty ! > > No, it isn't. Don't do something incoherent. > >> Suppose one wants to write a longword to some bit stream then bitcount >> would >> always be 32 ! > > I have no idea what you think you are talking about. There is no reason > you > need to use shifts to write to a bitstream. Perhaps more importantly, > what > on earth do you think you're shifting? If you have a 32-bit value, and > you > shift it by 32, you have shifted ALL of the data out of it. Why bother? > If you're not going to be using any remaining bits at all, why are you > performing an operation? I think to get rid of a branch (branches slow down cpu's) and thereby speed up the code. Would you rather write: // 1. Z := X shl Y; // or // 2. if Y < 32 then begin Z := X shl Y; end else begin Z := X; end; ? Bye, Skybuck.
From: Seebs on 27 May 2010 13:10 On 2010-05-27, Keith Thompson <kst-u(a)mib.org> wrote: > A quick look at Skybuck Flying's posting history in other newsgroups > might be illuminating. I have enough information to convince me that he's a waste of valuable electrons. I think he's probably purely trolling, but it's the kind of trolling where genuine stupidity shines through. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: James Harris on 27 May 2010 14:58 On 27 May, 18:10, Seebs <usenet-nos...(a)seebs.net> wrote: > On 2010-05-27, Keith Thompson <ks...(a)mib.org> wrote: > > > A quick look at Skybuck Flying's posting history in other newsgroups > > might be illuminating. > > I have enough information to convince me that he's a waste of valuable > electrons. I think he's probably purely trolling, but it's the kind > of trolling where genuine stupidity shines through. I'm not going to try and defend him but having seen his posts for some time I don't think he's trolling. His interests are or have been video processing. He puts a lot of effort into getting the best x86 instruction sequences from his Delphi compiler. The rest is mainly communication style. James
From: James Harris on 27 May 2010 15:06 On 27 May, 17:06, "Skybuck Flying" <IntoTheFut...(a)hotmail.com> wrote: > "Seebs" <usenet-nos...(a)seebs.net> wrote in message > > news:slrnhvt42m.72l.usenet-nospam(a)guild.seebs.net... > > > > > On 2010-05-27, Skybuck Flying <IntoTheFut...(a)hotmail.com> wrote: > >> So "shr 32" and "shl 32" could result in garbarge ?! > > > On many systems. > > >> That is pretty shitty ! > > > No, it isn't. Don't do something incoherent. > > >> Suppose one wants to write a longword to some bit stream then bitcount > >> would > >> always be 32 ! > > > I have no idea what you think you are talking about. There is no reason > > you > > need to use shifts to write to a bitstream. Perhaps more importantly, > > what > > on earth do you think you're shifting? If you have a 32-bit value, and > > you > > shift it by 32, you have shifted ALL of the data out of it. Why bother? > > If you're not going to be using any remaining bits at all, why are you > > performing an operation? > > I think to get rid of a branch (branches slow down cpu's) and thereby speed > up the code. > > Would you rather write: > > // 1. > Z := X shl Y; > > // or > > // 2. > if Y < 32 then > begin > Z := X shl Y; > end else > begin > Z := X; > end; If you are talking about x86 don't be afraid of branches. Instead, be afraid of unpredictable branches. Further, from examples I've seen in the past the processors can make a surprisingly good job of predicting sequences we might consider random. It does help if you can present it stable sequences: longish runs of Y < 32, longish runs of Y >= 32 in your example. James
From: Robert Myers on 27 May 2010 17:13
On May 27, 4:02 pm, Seebs <usenet-nos...(a)seebs.net> wrote: > On 2010-05-27, James Harris <james.harri...(a)googlemail.com> wrote: > > > I'm not going to try and defend him but having seen his posts for some > > time I don't think he's trolling. > > Could be. > > > His interests are or have been video > > processing. He puts a lot of effort into getting the best x86 > > instruction sequences from his Delphi compiler. The rest is mainly > > communication style. > > Could be, but it's a communications style which seems rude to me, and > the outrage at the idea that a processor might require you to give it > only semantically valid instructions strikes me as a bad sign. > Rudeness on Usenet? What *is* the world coming to? Main Entry: 1loll Pronunciation: \Ëläl\ Function: verb Etymology: Middle English Date: 14th century intransitive verb 1 : to hang loosely or laxly : droop 2 : to act or move in a lax, lazy, or indolent manner : lounge transitive verb : to let droop or dangle synonyms see idle â loll·er \Ëlä-lÉr\ noun In any case, computers know what programmers really mean. If not, they're just being difficult, like a recalcitrant child. A very stubborn and defiant recalcitrant child. Robert. |