From: Skybuck Flying on
Hmm I just realized something, the algorithm I was using/working needs a
"cache" the size of the largest supported write method...

So if I were to add int64 support, the cache would need to be 64 bits big.

I just tested int64 support, and it's almost twice as slow.

I just tested TableLookUp support with 32 bits, and it's twice as fast as
the int64 method.

The int64 method actually becomes three times as slow in combination with
the lookup table method.

The interesting thing is that the LookUpTable method actually caught this
algorithm shortcoming because of access violation...

I totally looked over this algorithm shortcoming (not my algorthm to start
with, just an extension/modified version of it... made more flexible too).

So the lookup table has saved me from doing stupid things like trying to
make the internal cache 8 bits or 16 bits will trying to store 32 bits in it
! haha.

I was kinda curious though to smaller cache support... I could test it with
a new test program but I am not interested in it because I need at least 24
bits and
preferably 32 bit support.

32 bit will last a long time... it's 64 K x 64 K :)

So for now it looks like I will be going with 32 bit and lookup tables...
unless practice turns up different results... or unless I really wants 64
bit writes and reads... but for now I don't really need them... maybe I will
also make a general read/write which can write any ammount of bits/bytes...
though this algorithm
is starting to give me some doubts here and there.

The nice thing could be that in the future if true 64 bit computers arrive
with faster 64 bit operations, and true 64 bit compilers, maybe the code
would run
much faster, time will tell ;) :) I am not holding my breath though ;) :)

Bye,
Skybuck.


From: Skybuck Flying on
The lookup table right now seems to be the best solution for 32 bit support.

This seems unthinkable ! ;) :)

Yesterday I saw some kid playing the piano, it was this song, it was
slightly playing through my head at the end of this
"research/design/development day" :)

"Lady Gaga - Paparazzi"

http://www.youtube.com/watch?v=d2smz_1L2_0

I guess this code is very delicate just like the song...

And I guess shl and shr is over/dead just like the Lady :) lol.

What's that I see over the horizon ? Hmmm I think it's a bunch of flying
lookups tables ! =D

Bye,
Skybuck.


From: Seebs on
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?

> And thus this code has the potential to screw up ?! :((

If so, the code sucks.

-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: Seebs on
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.

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