[Xorp-hackers] More ideas for xorp code size improvements.

Ben Greear greearb at candelatech.com
Thu Apr 15 11:26:48 PDT 2010


On 04/15/2010 09:10 AM, Bruce Simpson wrote:
> On 04/15/10 07:48, Ben Greear wrote:
>> ...
>> I'm not too sure.  It might be that horribly complex template
>> thing that builds callbacks methods.  If I were to tackle it, I'd
>> probably change some callback signatures to pass in const string&
>> and then see what broke and try to work backwards from there...
>>
>
> Futzing with 'string' might be a noop, because many STL implementations
> ref-count the internal string representation (GNU libstdc++ does, for
> example).

Yeah, looks like it wouldn't save much..but would still save a little,
and should be cleaner code.

There might be other areas where we are passing stuff by value that
could be const foo& as well..but I haven't looked hard.

Anyone know of any tools that help figure out what source code
is generating lots of object code?  (Ie, places to look to decrease
the size of the generated binaries & libraries).

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list