Re: [lisp-snmp] Misc fiddles for new OID types
Brought to you by:
binghe
From: John F. <jf...@ms...> - 2009-05-11 04:36:26
|
Hi Chun Tian, "Chun Tian (binghe)" <bin...@gm...> writes: [...] >> As I said before, the most sensible thing is probably just to use >> simple >> vectors as OIDs. > > I think this change wouldn't bring any essential performance boost > from the view of algorithm, right? If you are talking about time complexity in a naive way then that's true. But the time complexity in our workload is heavily affected by the GC. > A simple vector is "fast" than A list only when we need to access > specific elements in it. For simple vectors, we have O(1) performance > here (and O(n) for lists). But you should see, in ASN.1 package, any > time we need this vector/list, we need all elements from it. Here we > just waste some memory (which equals to the number of SIMPLE-OID > instances times a small factor), compare to the whole memory > requirements it's nothing. I think compared to the whole memory requirements and the strain on the garbage collector it is very important. Why do you think that it is not important? In our profile, the biggest memory user was OID creation (instances) and the oid-number-list creation. Both would be heavily reduced with simple vectors for OIDs [...] |