
On 17 May 2004 14:33, Christian Maeder wrote:
Simon Marlow wrote:
On 14 May 2004 19:14, Christian Maeder wrote:
for a map with several hundred thousand entries: (user seconds) (page faults) FiniteMap-only: 5.61 30613 DData.Map-only: 6.50 36911 DData.Map+IntMap: 4.14 21296 FiniteMap+IntMap: 3.85 19973
Could you try changing the definition of Map from to
data Map k a = Tip | Bin {-# UNPACK #-} !Size !k a !(Map k a) !(Map k a)
and see if that helps?
Yes, that helps. For some reason the user time decreased today, but the page faults for the unchanged code kept the same:
FiniteMap-only: 7.94 30613 DData.Map-only: 7.88 29700 DData.Map+IntMap: 5.72 20178 FiniteMap+IntMap: 5.54 19973
I'm not sure what page faults is measuring, but the fact that you get significantly different results today is disturbing! You can play the {-# UNPACK #-} trick in the IntMap code too, BTW. Cheers, Simon

Simon Marlow wrote:
I'm not sure what page faults is measuring, but the fact that you get significantly different results today is disturbing!
Today there's additionally running a fat (600MB) vmware on davinci. I thought page faults somehow correlate with memory consumption. Have you a better idea to measure time and space? I did profiling as well, but then sometimes profiling dates (-p) became better, while actual performance decreased.
You can play the {-# UNPACK #-} trick in the IntMap code too, BTW. -- | A map of integers to values @a@.
data IntMap a = Nil | Tip !Key a | Bin !Prefix !Mask !(IntMap a) !(IntMap a) On Prefix and Mask? When I omitted the "!" in " !k a !(Map k a) !(Map k a)" time was faster but page faults increased: Map-only: 7.37 29767 Christian
participants (2)
-
Christian Maeder
-
Simon Marlow