Almost there: improvement on client side but slowdown on server side (branches `SVG_with_Int_spans` of `clean-platform` and `iTasks-SDK`)
In the branches SVG_with_Int_spans
of clean-platform
and iTasks-SDK
you find a new implementation of PxSpan
that uses the new type MilliInt
(:: MilliInt = MilliInt !Int
) in module Graphics.Scalable.Internal.Types
instead of Real
.
The upside: client side evaluation improves with over 60%.
The downside: server side evaluation slows down with 50%.
Although the gain is much larger than the loss because the server wall clock times are much smaller than the client ones, it is clear that both sides will profit if instead of a MilliInt
an Int
is used. Unfortunately, you can not simply replace MilliInt
with Int
because of overloading. The solution would be to have Haskell style newtype
, but as far as I know these are not supported in Clean.
Due to holidays I won't be able to work on this for the next three weeks, so I invite you to have a go at it. Note that you need to use the branches SVG_with_Int_spans
of both clean-platform
and iTasks-SDK
.