Re:Why we didn't use a bloom filter
by Confusion on Saturday March 17, 2012 @04:15AM
(#3716637)
He doesn't claim you can: he just points out that it still adds overhead.
[ Parent
| on HN ]
It only adds overhead when using virtual member functions, in which case the equivalent in C is to "roll your own" vtables. You don't get away from that overhead.
If you don't use polymorphism, you don't need virtual member functions, in which case you don't pay the cost of a vtable.
This is one of the key tenets of C++: You pay for what you use, and only what you use.
Actually you can do it using template but it is quite convoluted. (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.130....)