Peter
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote
Can you try using configure-alt, and then type make?
Quote
peter@solarstriker:~/installation/newlisp-10.1.1$ ./configure-alt
Detected Operating System LINUX
Detected memory model LP64, using memory model LP64
UTF-8 is enabled
readline support is disabled
To enable readline support, use the --enable-readline option, and specify the
proper libraries to link by setting the RLFLAGS variable when running
configure. Also if necessary, use the INCLUDES variable to specify where the
readline header files are."
Type "make" to build your newlisp binary.
If that doesn't work, type "make help"
peter@solarstriker:~/installation/newlisp-10.1.1$ vim Makefile
peter@solarstriker:~/installation/newlisp-10.1.1$ make
make -f makefile_configure
make[1]: Entering directory `/home/peter/installation/newlisp-10.1.1'
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG newlisp.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-symbol.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-math.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-list.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-liststr.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-string.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-filesys.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-sock.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-import.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-xml.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-web.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-matrix.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-debug.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG pcre.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-utf8.c
gcc newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o -m64 -lm -ldl -o newlisp
strip newlisp
make[1]: Leaving directory `/home/peter/installation/newlisp-10.1.1'
Quote
newLISP v.10.1.1 64-bit on Linux IPv4, execute 'newlisp -h' for more info.
Quote
1124 ms on a 2.2Ghz AMD Phenom(tm) 9550 Quad-Core Processor
performance ratio: 0.5 (1.0 on Mac OS X, 1.83 GHz Intel Core 2 Duo)
Quote
# makefile for newLISP 64bit v.10.x.x on 64 bit LINUX tested on Intel Core Duo 2
#
# Note, that readline support may require different libraries on different OSs
#
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o
nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o
CFLAGS = -m64 -Wall -pedantic -Wno-uninitialized -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DNEWLISP64 -DLINUX
CC = gcc
default: $(OBJS)
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
$(CC) $(OBJS) -g -o newlisp -ldl -lm
strip newlisp
.c.o:
$(CC) $(CFLAGS) $<
$(OBJS): primes.h protos.h makefile_linuxLP64
Quote
If this is compiled Basic, then it looks pretty good for newLISP.
Quote
But still comparing compiled vs dynamic languages is comparing apples and oranges.
Quote
It is also not clear what this example really measures. Probably not floating point addition but rather internal time functions, or both.
Quote
But my main point is, that languages should not be compared by just testing one or two things, in this case floating point addition and retrieval of system time.
DECLARE t TYPE double
t = 0
end = NOW + 10
WHILE NOW < end DO
t = t + 0.0001
WEND
PRINT "Result is: ", t
#!/bin/newlisp
(set 't 0.0)
(set 'end (+ (time-of-day) 10000))
(while (< (time-of-day) end)
(set 't (add t 0.0001))
)
(println "Result is: " t)
(exit)
DECLARE t TYPE double
t = 0
start = SECOND(NOW)
end = start + 10
WHILE SECOND(NOW) NE end DO
t = t + 0.0001
WEND
PRINT "Result is: ", t
END
(set 't 0.0)
(set 'start (apply date-value (now)))
(set 'end (+ start 10))
(while (not (= (apply date-value (now)) end))
(set 't (add t 0.0001))
)
(println "Result is: " t)
(exit)
Quote
peter@solarstriker:~/programming$ ./benchmark
Result is: 574.7542999
Quote
peter@solarstriker:~/programming$ newlisp benchmark.lsp
Result is: 373.0229
Quote
And you change the hardware it is running on, or only the OS and it puts the results on its head.
Quote
Running this under Linux on the same CPU completely changes the picture. Some functions suddenly perform double as fast or slow.
Quote
I'm surprised there is no Debian or Ubuntu package for gtk-server.