From: Keith Thompson on
Seebs <usenet-nospam(a)seebs.net> writes:
> On 2010-05-27, Skybuck Flying <IntoTheFuture(a)hotmail.com> wrote:
>> The lookup table right now seems to be the best solution for 32 bit
>> support.
>
> I think at this point I'm plonking you. You're extremely verbose without
> saying much of anything, you overuse exclamation marks, you're overly
> exciteable, and apparently you don't have any clue how to frame a problem,
> think about what you need, and develop a plan for approaching it. Maybe
> you should consider decaf.

A quick look at Skybuck Flying's posting history in other newsgroups
might be illuminating.

--
Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Skybuck Flying on

"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
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
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
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