[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: data structure lockin
To be more complete, you also need to carefully tune your "compare" function when you use a purely functional data-structure: https://github.com/samoht/ocaml-dns/commit/053c12bcff4287de86fc2e686b21e99e98cd083c I'vet passed from 25k qps to 30k qps by just doing this. The same trick works with the memoization table: https://github.com/samoht/mirage-skeleton/commit/6ed135317f78f4cab580c8e7d1e5d919ff188147 -- Thomas On Jan 16, 2013, at 10:41 PM, Richard Mortier wrote: > nice... :) > > On 16 Jan 2013, at 22:38, Anil Madhavapeddy wrote: > >> Continuing the topic of data structures, I noticed a slowdown for the DNS >> performance after the recent conversion to cstruct. While the memoized >> version (which caches marshalled packets) was about the same performance, >> the normal one was much slower (even worse than BIND). >> >> Thomas did some profiling today, and it turns out that the use of a mutable >> Hashtbl for tracking label compression results in very bad performance, >> since the string lists all have hash collisions and ends up linearising the >> structure. He converted it to use a purely functional Map instead (which >> just lives on the minor heap since it's only needed for one packet parse >> cycle), and performance is right back where it should be! >> >> https://github.com/samoht/ocaml-dns/commit/fd68be3850353f2fb981b100bf04562ae0d99a1e >> >> (mainly fyi for Mort, but useful for others too) >> >> -anil > > > -- > Cheers, > > R. > > > > > This message and any attachment are intended solely for the addressee and may > contain confidential information. If you have received this message in error, > please send it back to me, and immediately delete it. Please do not use, > copy or disclose the information contained in this message or in any > attachment. Any views or opinions expressed by the author of this email do > not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |