Discussion:
ulm's oberon questions
(too old to reply)
s***@gmail.com
2005-06-10 08:02:42 UTC
Permalink
Hello.
I had installed and get work ulm's oberon compiler.
That's good.
But my executables produced with obbuild is too big.
Simple Welcome example is 1.3 mb size.
After stripping the binary file remains about 500 kb
It is too much imho.
obbuild produce only static binaries.
So, first question is:
Is it possible to reduce the size of binaries?

Second question
Is it possible debug with gdb/ddd ?
ddd said me that can't find debugging symbols when file said 'file
unstripped'

Thank You very much!
s***@gmail.com
2005-06-10 18:55:34 UTC
Permalink
I made some tests and realize that not only size, but also speed of
produced binaries may be better.
But another question...
May be it is just because features of oberon?
Error protection, garbage collector.
May be it all integrated in the produced binary?
And because of that, not because of lack of optimization compiler
produce relatively slow and big binaries?
And if so, I am pretyy happy with this compiler, because I don't want
to use mono/.net ot java, I prefer to have native code but this is a
cost for native managed code?
If so, this is good.
I will be thankful to any replay about this topic.
Thanks.
Andreas F. Borchert
2005-06-11 07:22:18 UTC
Permalink
Post by s***@gmail.com
I made some tests and realize that not only size, but also speed of
produced binaries may be better.
I do not know what do you have tested yet. Please do not forget
to tune Storage.Intensity (see the manual page of Storage) if you
are benchmarking memory-intensive stuff. Otherwise, most of the
time is wasted by the garbage collection.

It might be useful to run any benchmarks under the control of the
(yet undocumented) SysMonitor module. It works this way:

SysMonitor.Start; (* start profiling *)
(* run your benchmark here *)
SysMonitor.Stop(Streams.stderr); (* write statistics to the given stream *)

Redirect stderr to some file and filter it through ``sort -n''.
SysMonitor uses profil(2) which checks the PC location at periodic
intervals. The output of SysMonitor gives the information how often
the PC was found to be in the range of which procedure.

Andreas.
Andreas F. Borchert
2005-06-11 07:38:51 UTC
Permalink
Post by s***@gmail.com
I made some tests and realize that not only size, but also speed of
produced binaries may be better.
Sometimes examples help to demonstrate the strengths of a system.
You will find a small demo (less than 100 lines of code) that reverses
large number of IPv4 addresses at [1]. Just feed it with a huge number
of random IP addresses (for example out of the logs of a web server).
Please try to find a tool that performs this job faster. This demo
beats dnsfilter by Dan Bernstein easily which is written in C and the
next-quickest solution known to me.

Andreas.

[1] ftp://ftp.mathematik.uni-ulm.de/pub/soft/oberon/ulm/i386/examples/
s***@gmail.com
2005-06-11 10:21:41 UTC
Permalink
Thank You very much for all.
I didn't know that ulm compiler is beta release for linux.
I just found native code oberon compiler for linux and started to test
it.
Most of the tests related to floating point operations.
Anyway, now I realize that I found a great compiler!!!
Really, it is a miracle to have managed native code that works in
linux, not in the .net or java virtual machine.
Thank you very much for huge work.
I am starting to programming in oberon for linux.
My next projects will be made with your compiler definitely.
Thank you very much again.
I found suitable compiler !!!!!!!!!!!!
Vit
2005-06-14 08:54:37 UTC
Permalink
Post by s***@gmail.com
I just found native code oberon compiler for linux and started to test
it.
Why not try XDS M2/O2 compiler for Linux?
(http://www.excelsior-use.com/xds.html)
Its optimization characteristics (which seem to be important for you) are very good.

Vit

Andreas F. Borchert
2005-06-11 07:10:21 UTC
Permalink
Post by s***@gmail.com
But my executables produced with obbuild is too big.
Simple Welcome example is 1.3 mb size.
Please note that you have downloaded and used a beta release [1]. Up to
now I never advertised it here or elsewhere. As the support of dynamic
loading is not finished yet, we are currently enforced to build static
binaries.

A complete static binary of this size is not that huge. g++ generates
a 3,6 MB static binary for a hello-world example that can be stripped
down to 898k. (And our Oberon binary includes far more useful stuff
like a garbage collector, address space management, concurrency etc).

Andreas.

[1] ftp://ftp.mathematik.uni-ulm.de/pub/soft/oberon/ulm/i386/
(With all reservations for an unfinished project. It includes all
sources and can be freely distributed and used under the terms of
the GPL).
Loading...