[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data structure lockin

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



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
servers 24x7x365 and backed by RackSpace's Fanatical Support®.