Re: [fpc-pascal] Prospects for running Lightspeed/THINK Pascal and Codewarrior Pascal with FPC

2014-08-25 Thread Jerry
On Aug 21, 2014, at 12:11 PM, Ingemar Ragnemalm wrote: > On 21/08/14 07:41, Jerry wrote: >>> I have a lot of old Pascal that I am getting interested in reviving. It was >>> originally written in Lightspeed/THINK Pascal (did I mention it is old?) >>> and around 2000-2002 I converted it to Codew

Re: [fpc-pascal] TProcess stack size

2014-08-25 Thread Frank Poretzky
Hi Michael, on Mon, 25 Aug 2014 11:33:59 +0200 (CEST), you wrote: >On Fri, 22 Aug 2014, Frank Poretzky wrote: > >> Hi, >> >> in MS Windows is there a way to increase stack size for an executable >> run through TProcess? > >Not that I am aware of. > >> For portability reasons I tried to migrate fr

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Mark Morgan Lloyd
Juha Manninen wrote: Ok, thanks. This is yet another topic I should learn about. Tony, I don't believe pycrc can generate much faster functions than ours unless it uses SIMD. Our function works well but it is called so ofter that its speed is relevant. Mark, I promise to study the algorithms bu

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Tony Whyman
Juha, You may find these references useful "Computation of Cyclic Redundancy Checks vis Table Lookup" Dilip V Sarwate, Communications of the ACM, August 1988. "An Arithmetic Checksum for Serial Transmission" John G. Fletcher, IEEE Transactions on Communications, January 1982 On 25/08/14 10:52,

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Juha Manninen
Ok, thanks. This is yet another topic I should learn about. Tony, I don't believe pycrc can generate much faster functions than ours unless it uses SIMD. Our function works well but it is called so ofter that its speed is relevant. Mark, I promise to study the algorithms but changing our algorith

Re: [fpc-pascal] TProcess stack size

2014-08-25 Thread Michael Van Canneyt
On Fri, 22 Aug 2014, Frank Poretzky wrote: Hi, in MS Windows is there a way to increase stack size for an executable run through TProcess? Not that I am aware of. For portability reasons I tried to migrate from CreateProcess to TProcess, but when executing more complex operations of the c

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Mark Morgan Lloyd
Juha Manninen wrote: Wow, with long input data strings it is 10 * faster! But, bummer, it returns a different value. :( Our CRCs are stored around in DBs and we need the same value. I thought CRC algorith is a standard but apparently not. Sorry, that was uncalled for. I can't speak for high

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Tony Whyman
Juha, There are indeed many different CRC algorithms. The division polynomial typically determines the function - but there are other tweaks including whether you are dealing with big endian or little endian numbers. The division polynomial is chosen such that it never divides exactly into the pre

[fpc-pascal] Fast CRC functions?

2014-08-25 Thread Juha Manninen
We have an old function for calculating CRC like: function CalcCRC(const Str: String): Cardinal; var Len, i, CRCVal: Cardinal; Begin Len := Length(Str); CRCVal := $; if Len > 0 then for i := 1 to Len do CRCVal := CRCTbl[Byte(CRCVal xor Cardinal(Str[i]))] xor ((CRCVal shr