Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > An Easier Way?

Reply
Thread Tools

An Easier Way?

 
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      07-25-2013
On Wednesday, July 24, 2013 12:47:55 PM UTC-5, Öö Tiib wrote:
>
> That "object size" generally matters only when it is embedded
> software. Otherwise it is down in my wishlist somewhere among
> "good to have". The authors of libstdc++ do it for free so if
> you know a way how to make some thing in it more efficient then
> help them.


I revisited this. I don't know if it's due to using a newer
version of clang and/or that I was more careful this time, but
I've changed my mind about to_string.

I would guess it's because I was more careful about the
testing this time and changed both of my uses of ostringstream
to to_string rather than just one of them. Anyway, now
when I change both uses, I find that the sizes of two of
my executables decrease. At any rate, I'm happy to find
that to_string is working better than stringstream. I
didn't think stringstream had set the bar that high so
was surprised in the first place with my previous results
and believe this result is more accurate.

Brian
Ebenezer Enterprises - John 3:16.
http://webEbenezer.net
 
Reply With Quote
 
 
 
 
red floyd
Guest
Posts: n/a
 
      07-25-2013
On 7/25/2013 10:58 AM, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> On Wednesday, July 24, 2013 12:47:55 PM UTC-5, Öö Tiib wrote:
>>
>> That "object size" generally matters only when it is embedded
>> software. Otherwise it is down in my wishlist somewhere among
>> "good to have". The authors of libstdc++ do it for free so if
>> you know a way how to make some thing in it more efficient then
>> help them.

>
> I revisited this. I don't know if it's due to using a newer
> version of clang and/or that I was more careful this time, but
> I've changed my mind about to_string.
>


The other question about "object size" is, are you meauring the
size of the executable file, or are you actually measuring the
size of the text/data/bss segments?

Because the executable is loaded with all sorts of other stuff
such as symbol tables, debugging info, etc...

If you're on a *nix system, use "size" to measure the actual
size of your executable. In Windows, I *THINK* that objdump
will do something similar.



 
Reply With Quote
 
 
 
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      07-25-2013
On Thursday, July 25, 2013 4:45:05 PM UTC-5, red floyd wrote:
>
> The other question about "object size" is, are you meauring the
> size of the executable file, or are you actually measuring the
> size of the text/data/bss segments?
>
> Because the executable is loaded with all sorts of other stuff
> such as symbol tables, debugging info, etc...
>


I was measuring the size of the files not the segments.
I know of objdump, but didn't know about that size command.
The executables are generally stripped of debugging info.
..

 
Reply With Quote
 
red floyd
Guest
Posts: n/a
 
      07-26-2013
On 7/25/2013 3:16 PM, (E-Mail Removed) wrote:
> On Thursday, July 25, 2013 4:45:05 PM UTC-5, red floyd wrote:
>>
>> The other question about "object size" is, are you meauring the
>> size of the executable file, or are you actually measuring the
>> size of the text/data/bss segments?
>>
>> Because the executable is loaded with all sorts of other stuff
>> such as symbol tables, debugging info, etc...
>>

>
> I was measuring the size of the files not the segments.
> I know of objdump, but didn't know about that size command.
> The executables are generally stripped of debugging info.
> .
>


For Windows, use "objdump -h" to get the size of the text and data
segments.

For Linux, just use the "size" command.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Has to be an easier way? (gateway issues) Captain Cisco 13 08-28-2004 12:30 AM
Hash of Structs in a Package, is there an easier way? Norman Ackroyd Perl 1 07-28-2004 11:54 AM
hyperlinks - does an easier way exist? PiotrO ASP .Net 0 05-02-2004 02:57 PM
Easier way to access a Datagrid Dataitem? Raterus ASP .Net 1 02-13-2004 02:14 PM
Easier way to get xmlAttributes from xpaths? Kathy Burke ASP .Net 0 07-31-2003 02:13 AM



Advertisments