[s-xml-rpc-devel] loss of precision on double

Jeff Sapp jasapp at gmail.com
Tue Sep 11 00:39:29 UTC 2007


Hey, I was using s-xml-rpc to receive some double values and I noticed
that was losing precision on them.

I looked a bit closer and I noticed that the function
decode-xml-rpc-new-element was reading in doubles with
read-from-string which has a default return type of single-float. I'd
still consider myself new
at this lisp business, so my fix probably isn't stellar.

I've also run into some performance issues and I was wondering if anyone
had some advice. The function I'm having particular trouble with returns
a list of lists, where the outside list is about 20k elements long, and the
inside lists around no larger than 20. It takes about two minutes to encode
the whole thing.

If you had to make the encoding more efficient, where would you start?

Thanks,
~jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 169 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/s-xml-rpc-devel/attachments/20070910/aa3a4c4a/attachment.obj>


More information about the S-xml-rpc-devel mailing list