Re: [lisp-snmp] Misc fiddles for new OID types
Brought to you by:
binghe
From: Chun T. (binghe) <bin...@gm...> - 2009-05-11 05:39:31
|
All right, I'll see what I can do. --binghe 在 2009-5-11,12:36, John Fremlin 写道: > 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 > > [...] > |