[fpc-pascal] Fast CRC32
Pianoman
pianoman at centrum.sk
Sun Apr 16 12:16:22 CEST 2006
Hello , I need to know whether someone has fast routines to calculate
crc32 of let's say 64 k buffer.
Any help would be appreciated
Pianoman
----- Original Message -----
From: <fpc-pascal-request at lists.freepascal.org>
To: <fpc-pascal at lists.freepascal.org>
Sent: Sunday, April 16, 2006 12:02 PM
Subject: fpc-pascal Digest, Vol 20, Issue 18
> Send fpc-pascal mailing list submissions to
> fpc-pascal at lists.freepascal.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> or, via email, send a message with subject or body 'help' to
> fpc-pascal-request at lists.freepascal.org
>
> You can reach the person managing the list at
> fpc-pascal-owner at lists.freepascal.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fpc-pascal digest..."
>
>
> Today's Topics:
>
> 1. Re: Division by Zero - not raised exception (Sasa Zeman)
> 2. Re: Division by Zero - not raised exception (Florian Klaempfl)
> 3. Re: Division by Zero - not raised exception (Sasa Zeman)
> 4. Re: Division by Zero - not raised exception (Florian Klaempfl)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 16 Apr 2006 10:16:27 +0200
> From: "Sasa Zeman" <public at szutils.net>
> Subject: Re: [fpc-pascal] Division by Zero - not raised exception
> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
> Message-ID: <001b01c6612e$11bfa500$6ec6f4d5 at u>
> Content-Type: text/plain; charset="iso-8859-1"
>
> > > FPC 2.0.2 do not rasie exception on integer/floats division by Zero,
> which
> > > is suitable for calucaltion I currently developing. Instead, division
> > > return infinity:
> > >
> > > writeln(1/0) -> +inf
> > > writeln(1.0/0) -> +inf
> > Already fixed.
>
> Unfortunatelly, bug still persists when division is performed with
> constants.
> Please take a look bug report #5018 for details.
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 16 Apr 2006 10:23:06 +0200
> From: Florian Klaempfl <florian at freepascal.org>
> Subject: Re: [fpc-pascal] Division by Zero - not raised exception
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID: <4441FEEA.7020702 at freepascal.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Sasa Zeman wrote:
> >>> FPC 2.0.2 do not rasie exception on integer/floats division by Zero,
> > which
> >>> is suitable for calucaltion I currently developing. Instead, division
> >>> return infinity:
> >>>
> >>> writeln(1/0) -> +inf
> >>> writeln(1.0/0) -> +inf
> >> Already fixed.
> >
> > Unfortunatelly, bug still persists when division is performed with
> > constants.
> > Please take a look bug report #5018 for details.
>
> We don't consider this as a bug, it's for delphi compatibility reasons.
> These expressions are evaluated at compile time, so it's something
> differnt. If you want to get an error, compile with -Cr.
>
> ------------------------------
>
> Message: 3
> Date: Sun, 16 Apr 2006 11:34:45 +0200
> From: "Sasa Zeman" <public at szutils.net>
> Subject: Re: [fpc-pascal] Division by Zero - not raised exception
> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
> Message-ID: <003601c66139$02378160$6ec6f4d5 at u>
> Content-Type: text/plain; charset="iso-8859-1"
>
> > We don't consider this as a bug, it's for delphi compatibility reasons.
> > These expressions are evaluated at compile time, so it's something
> > differnt. If you want to get an error, compile with -Cr.
>
> The -Cr will point on error in the code, however, enabling range checking
> will also affect on global speed performance.
>
> Definition in documentation (RTL.pdf):
> "
> 29.20 EDivByZero
> 29.20.1 Description
> EDivByZero is used when the operating system or CPU signals a division by
> zero error.
> "
> As defined, reported issue is a bug. As well globaly, in consistency
terms.
>
> Far I can see, the core of the problem is in definiton of Infinity
constant
> as 1.0/0.0 and NaN with ln(-1.0) or 0.0/0.0 Perhaps this is necessary to
> avoid problem with probably difference between different CPU/FPUs.
However,
> IEEE specification should be followed by all of them and bits manipulation
> to perform infinity should be enough, instead to calculate it (as is
> performed currently).
>
>
> ------------------------------
>
> Message: 4
> Date: Sun, 16 Apr 2006 11:40:35 +0200
> From: Florian Klaempfl <florian at freepascal.org>
> Subject: Re: [fpc-pascal] Division by Zero - not raised exception
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID: <44421113.3090306 at freepascal.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Sasa Zeman wrote:
> >> We don't consider this as a bug, it's for delphi compatibility reasons.
> >> These expressions are evaluated at compile time, so it's something
> >> differnt. If you want to get an error, compile with -Cr.
> >
> > The -Cr will point on error in the code, however, enabling range
checking
> > will also affect on global speed performance.
>
> The program won't compile with -Cr.
>
> >
> > Definition in documentation (RTL.pdf):
> > "
> > 29.20 EDivByZero
> > 29.20.1 Description
> > EDivByZero is used when the operating system or CPU signals a division
by
> > zero error.
> > "
> > As defined, reported issue is a bug. As well globaly, in consistency
terms.
>
> ... operating system or CPU ...
> but not the compiler ;)
>
> The point is: this div by zero is encountered at compilation time.
> The other option is to stop compilation always. Executing the operation
> at run time is useless imo and a waste of CPU cycles.
>
> >
> > Far I can see, the core of the problem is in definiton of Infinity
constant
> > as 1.0/0.0 and NaN with ln(-1.0) or 0.0/0.0
>
> No. These constants are defined in const blocks. A const block couldn't
> throw an exception.
>
> > Perhaps this is necessary to
> > avoid problem with probably difference between different CPU/FPUs.
However,
> > IEEE specification should be followed by all of them and bits
manipulation
> > to perform infinity should be enough, instead to calculate it (as is
> > performed currently).
> >
> > _______________________________________________
> > fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> >
>
>
> ------------------------------
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
> End of fpc-pascal Digest, Vol 20, Issue 18
> ******************************************
>
>
> __________ Informacia od NOD32 1.1490 (20060415) __________
>
> Tato sprava bola preverena antivirusovym systemom NOD32.
> http://www.eset.sk
>
>
More information about the fpc-pascal
mailing list