development release version 9.0.14

Started by Lutz, January 04, 2007, 04:58:36 AM

Previous topic - Next topic

pjot

#15
Hi Lutz,



@[text]: your proposal solved the issue!



@flt: you are right, of course, I changed the code in "nl-import.c" as follows:

320 /* used when passing 32bit floats to library routines */
321 CELL * p_flt(CELL * params)
322 {
323 double dfloatV;
324 float floatV;
325 //UINT number;
326 unsigned int number;
327
328 getFloat(params, &dfloatV);
329
330 floatV = dfloatV;
331 memcpy(&number, &floatV, 4);
332
333 return(stuffInteger(number));
334 }


So the UINT has been replaced by 'unsigned int'. Same issue as with the [text]-problem. The (flt) function work perfectly OK now!



Now only one problem is left, I am going to investigate it now.



Peter

pjot

#16
OK this was really simple. The whole issue comes down to the format string "%llx".
Quote
[peter@olga]# newlisp

newLISP v.9.0.14 64-bit on Tru64Unix, execute 'newlisp -h' for more info.



> (format "%llx" (~ 0xa0a0a0a0a0a0a0a0))



problem in format string in function format : "%llx"

> (format "%lx" (~ 0xa0a0a0a0a0a0a0a0))

"5f5f5f5f5f5f5f5f"

> (exit)


So if I change "%llx" to "%lx" in 'qa-dot' then all tests pass!



What do you propose as a nice workaround for this issue?



Anyway everything from 'qa-dot' works, I will test some of my private programs now.



Peter

Lutz

#17
Thats the way it is in TRU64, it is already documented this way since 9.0 her http://newlisp.org/downloads/newlisp_manual.html#format">http://newlisp.org/downloads/newlisp_manual.html#format



the problem is not with TRU64 but with qa-dot ;), I will put a fix in qa-dot and qa-comma.



Thanks for discovering the 'unsigned int' fix for p_flt(), it was pure luck, that this did not cause problems on AMD64. Amazing how each new port can uncover new bugs.



The fact that 64-bit mode now runs on two different platforms  (Tru64 and Linux) is a nice validation, that the new 64-bit flavor seems to be mostly Ok.



Please send me the new 'makefile_tru64' and all changes so I can work them into 9.0.15. I already did the fixes for 'unsigned int' for [TEXT] and 'flt', but I am not sure about all other #ifdef TRU64





Lutz



ps: I will try to put out a 9.0.15 Monday or Tuesday, or whenever you are done.

pjot

#18
Lutz,



Get ready for more good news!



1) The programs I tested in Tru64Unix all work, without any problem.

2) The performance actually is impressive. On a DS-15 with an Alpha processor running at 1Ghz speed, the performance faster (about 5-10%) compared to a 32-bit Intel running at the double speed of 2Ghz!



For the changes, if I remember well, it were these:



1) Remove the 'pointer_size' stuff from newlisp.h but leave the additional defines

2) Remove the 'pointer_size' stuff from newlisp.c

3) Remove the 'pointer_size' stuff from nl-filesys.c

4) Remove the 'pointer_size' stuff from nl-string.c but leave the line with 'result = strtoul...'



The modified sources I have uploaded for your reference, I will send a PM with the location. I have modfied the makefile_tru64 also, and the TRU64BUILD in the doc-directory. You will find these in the package.



Cheers

Peter

newdep

#19
Here some speed tests with the latest release ;-)



All did the same LZW (by pjot) compression with newlisp.







DS-15 1Ghz processor

--------------------------------

Tru64Unix 32-bit: 20341 msecs



Tru64Unix 64-bit: 19299 msecs







AMD Athlon 2400+ XP processor

----------------------------------------------

Linux 32-bit: 11203 msecs







AMD Athlon64 3200+ processor

----------------------------------------------

Linux 32-bit: 5431







Pentium-4 1500/500 processor

----------------------------------------------

OS/2 32-bit: 22324
-- (define? (Cornflakes))

newdep

#20
Intel Pentium-3 700 Mhz (laptop)

----------------------------------------------

Linux 32-bit: 33100 msecs





Intel Pentium-4 2 GHz  (laptop)

----------------------------------------------

WinXP-Pro 32-bit: 21930 msecs
-- (define? (Cornflakes))