[Om] Binary Encoding in org.symcomp.openmath
Peter Horn
hornp at mathematik.uni-kassel.de
Thu Feb 12 16:44:07 CET 2009
Hi, Folks!
I recently added some neat additional features to the
org.symcomp.openmath library, mainly adding binary encoding and
decoding.
This library is used by all Java applications within the SCIEnce project
to handle OpenMath and to do the SCSCP communication:
http://www.symbolic-computation.org/scscp
I created a convention for 'my compressed binary encoding'. Whenever I
come across a previously unseen OMS, I'll give it an id of the form
"##n" where "#" is the symbol "#" and n is a number (sequentially
chosen, for that matters). Whenever I encounter the SAME Symbol again,
I'll replace it by the binaryencoded "localref n". The opposite thing
is done when PARSING, such that there will be no id="##n" in the
'output'. Note that this is (apart from the second #, possibly) well
within the scope of binary openmath.
Some examples:
xml - OpenMath in XML encoding,
bin - OpenMath in binary encoding,
cbin - OpenMath in 'my compressed binary encoding'
File | File Size | Parsing Time
| xml | bin | cbin | xml | bin | cbin
------+------+------+------+-------+-------+-------
test1 | 8.1M | 2.6M | 1.1M | 2.2s | 1.3s | 0.8s
test2 | 129M | 41M | 17M | 30.6s | 18.1s | 11.2s
test3 | 126M | 48M | 36M | 19.7s | 10.1s | 7.0s
test4 | 6M | 2.5M | 1.2M | 50.7s | 0.1s | 0.1s
In the files test1,..,test3 there are a lot of OMAs and OMS, since
these are mainly giant matrices over polynomial rings. In test4, the
content is dominated by HUUGE integers.
Summing up, I think that the Binary encoding is well worth the efford,
for it's way leaner and faster to process. We should IMHO consider to
include it into our stuff in some way. Especially if someone plans to
store the stuff into a database, this is worth considering.
Best, Peter
--
Peter Horn, University of Kassel *
Computational Mathematics Group * *
Heinrich Plett Str. 40, 34132 Kassel * [S] [C] [I] [E] [n] [c] [e]
Phone: + 4 9 - 5 6 1 - 8 0 4 - 4 1 9 2 * http://www.symcomp.org
Fax: + 4 9 - 5 6 1 - 8 0 4 - 4 6 4 6 *
E-Mail: hornp at mathematik.uni-kassel.de * *
http://kassel.symcomp.org/ *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1782 bytes
Desc: not available
Url : http://openmath.org/pipermail/om/attachments/20090212/e3f00c5b/attachment.bin
More information about the Om
mailing list