Filip Konvička wrote:
Yes, but the question was strictly about minimal memory footprint. I
suggested to invest some limited effort into "optimization" of the
existing code rather than rewriting the whole thing to Oz, hoping that a
straightforward rewrite of the C++ code in Oz would consume less memory.
Can you elaborate a bit on "rewrite of the C++ code in Oz"? Any idea to
improve Mozart is welcome! We are fully open to suggestions.
Two more comments:
1. IMHO C++ has become quite high-level in recent years, if you stick to
the standard containers.
2. Oz is cool - I think we'll agree on this :-)
Some features of Oz makes this not so easy.
First, types are dynamic in Oz. Record arities are created at runtime,
for instance. In most cases, the virtual machine has to handle
references to data whose type is only known dynamically...
Second, the most central data structure in Mozart is definitely not a
"standard container": dataflow variables. A variable is a transient
entity that is eventually bound to a value or another variable. You
need a dereferencing mechanism to cope with variables. If you get a
look at the implementation, you'll see that variables are incredibly
compact.
I think that although you can achieve (I think that with no effort)
better memory behavior in C++ than Oz (not only consumption, but also
fragmentation etc.), Oz may be more suitable for some operations on the
data. But this is beyond the topic, isn't it?
If you can do that with no effort, please tell us! ;-)
Note that the garbage collector of Mozart automatically compactifies
memory, hence no fragmentation issue here. Note also that quite a few
basic operations are defined entirely in Oz, like the module List.
Cheers,
raph
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users