|
Boost Users : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-29 16:58:57
AMDG
Robert Dailey wrote:
> Well I'm not 100% sure of the performance impact RTTI will have on the
> application. What I've read is that RTTI can get very expensive in
> terms of executable size if you have a lot of classes in your application.
You should be able to switch between using RTTI and using ID's in the
dispatcher with
a few lines of code. *Measure the difference* before making decisions
for performance
considerations.
> Unfortunately I don't think I could get away with using strings since
> the network is assigning integral values to the packets in order to
> uniquely identify them.
Of course, if you need the ID's around anyway for other reasons, they are
not a problem. I wouldn't expend Herculean efforts to eliminate them.
> I like the string idea because it doesn't have the repetitive code in
> each derived class (the overridden GetID method that will be the same
> in each derived class).
struct WalkPacket : CRTPPacket<WalkPacket, PID_WALKPACKET> {}; ?
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net