User: Password:
|
|
Subscribe / Log in / New account

Are red-black trees really the best ordered-map mechanism that the kernel hotshots can manage?

Are red-black trees really the best ordered-map mechanism that the kernel hotshots can manage?

Posted Jun 16, 2012 6:20 UTC (Sat) by daniel.santos (guest, #85158)
In reply to: Are red-black trees really the best ordered-map mechanism that the kernel hotshots can manage? by ncm
Parent article: Generic red-black trees

Well, that's another advantage to using the big macro in this case. My primary motivation when I started this was to completely eliminate the need for an rbtree user to muck with any of the implementation details. You should treat it as an container. Luckily, I seem to have managed that without incurring a run-time abstraction overhead (I wont absolutely know for certain until I get some good performance tests that compare hand-written search & insert with the generic).

Just remember: abstraction doesn't have to incur a run-time overhead. If done correctly, you can take it out of the compiler. I guess luck doesn't hurt sometimes as well (i.e., having an interface that can be mutated).


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds