This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[c++] CVS gcc-2.96 -O2 vs gcc-2.95.2 -O2



Thanks for all the fixes! I'm now able to compile libstdc++-v3 with
-O2, and get some kind of feel for the tree-based inliner. 

Using identical sources, I built CVS v-3 with -O2 and ran the
testsuite (a la 'make check'). I did run into some cases where 2.95.2
could not inline things that CVS egcs could handle, so for these parts
of the library (stringMAIN, valarray-inst) gcc-2.95.2 compiled with no
optimization flags, which effects the sanity of the results
below. 

I didn't see any huge changes, which I assume is a good thing. I did
notice a couple places where the executable exhibited different
behavior, so I'm investigating these bits.

In general, it looks like CVS egcs is a little to a lot slower,
depending on the code. I still have to tune the v-3 inlines, but the
binary size doesn't seem to be significantly bigger or smaller.

I haven't really looked at generated code, which would probably be useful.

-benjamin

-----------------


host: Linux 2.3.29 #1 Sat Nov 27 23:00:25 PST 1999 i586
compiler: 2.96 then 2.95.2
compiler flags: -g -O2 -DDEBUG_ASSERT 
date: 991213

p == pass/fail execution test
ctime == time to compile and link
etime == time for executable to run (take with salt)
text == size of the executable text section
data == size of the executable data section
total == size of the executable

p ctime	etime	text	data	total	name	
+ 1	0.000	160236	29898	877592	17_intro/header_ciso646.cc // egcs
+ 2	0.010	160212	29898	876696	17_intro/header_ciso646.cc // 2.95.2

+ 4	0.000	168060	29845	1033355	17_intro/header_fstream.cc // ??
+ 5	0.000	513266	41349	4074697	17_intro/header_fstream.cc

+ 3	0.000	160204	29770	980350	17_intro/header_iomanip.cc
+ 3	0.000	167593	29909	1023075	17_intro/header_iomanip.cc

+ 2	0.000	160204	29770	951765	17_intro/header_ios.cc
+ 2	0.000	167593	29845	995111	17_intro/header_ios.cc

+ 0	0.000	160204	29770	880349	17_intro/header_iosfwd.cc
+ 1	0.000	167412	29813	922547	17_intro/header_iosfwd.cc

+ 5	0.000	517047	40133	4013068	17_intro/header_iostream.cc
+ 4	0.000	513458	40645	4018260	17_intro/header_iostream.cc

+ 2	0.000	160204	29770	978466	17_intro/header_istream.cc
+ 3	0.000	167593	29909	1021884	17_intro/header_istream.cc

+ 2	0.000	160204	29770	951854	17_intro/header_ostream.cc
+ 2	0.000	167593	29845	995200	17_intro/header_ostream.cc

+ 3	0.000	160204	29770	978598	17_intro/header_sstream.cc
+ 2	0.000	167593	29909	1022049	17_intro/header_sstream.cc

+ 2	0.000	160204	29770	951620	17_intro/header_streambuf.cc
+ 2	0.000	167593	29845	994271	17_intro/header_streambuf.cc

+ 10	0.000	517047	40165	4059866	17_intro/headers.cc
+ 8	0.000	513394	41893	4126226	17_intro/headers.cc

+ 1	0.000	168092	29909	946030	18_support/numeric_limits.cc
+ 1	0.000	167444	29941	950191	18_support/numeric_limits.cc

+ 23	0.000	207207	30987	1516876	21_strings/append.cc
+ 10	0.000	201234	31115	1482720	21_strings/append.cc

+ 10	0.000	191623	30507	1286262	21_strings/capacity.cc
+ 6	0.000	186638	30507	1277933	21_strings/capacity.cc

+ 3	0.000	182935	30379	1154198	21_strings/char_traits.cc
+ 2	0.000	179342	30379	1142837	21_strings/char_traits.cc

+ 5	0.000	186711	30475	1185746	21_strings/compare.cc
+ 4	0.000	182574	30507	1176684	21_strings/compare.cc

- 4	0.000	0	0	0	21_strings/ctor_copy_dtor.cc
- 3	0.000	0	0	0	21_strings/ctor_copy_dtor.cc

+ 4	0.000	183591	30507	1166107	21_strings/element_access.cc
+ 2	0.000	180030	30603	1159115	21_strings/element_access.cc

+ 6	0.000	201367	30667	1417610	21_strings/find.cc
+ 3	0.010	197490	30827	1411520	21_strings/find.cc

+ 10	0.000	189271	30955	1227838	21_strings/insert.cc
+ 6	0.000	184686	31051	1208489	21_strings/insert.cc

+ 20	0.020	525143	41189	4049565	21_strings/inserters_extractors.cc
+ 18	0.000	523238	42917	4238570	21_strings/inserters_extractors.cc

+ 9	0.000	190407	30539	1235981	21_strings/invariants.cc
+ 6	0.000	184958	30699	1224440	21_strings/invariants.cc

+ 56	0.000	202823	30507	1367990	21_strings/nonmember.cc
+ 20	0.000	196126	30507	1347340	21_strings/nonmember.cc

+ 4	0.000	184967	30421	1177958	21_strings/operations.cc
+ 3	0.000	180958	30453	1171885	21_strings/operations.cc

+ 6	0.000	187735	30475	1208927	21_strings/replace.cc
+ 4	0.000	183598	30667	1202776	21_strings/replace.cc

+ 4	0.010	184599	30443	1171829	21_strings/substr.cc
+ 3	0.010	180830	30571	1171645	21_strings/substr.cc

+ 5	0.000	517559	40293	4010046	22_locale/ctype.cc
+ 5	0.000	513746	41413	4054843	22_locale/ctype.cc

+ 8	0.000	187191	30539	1253342	23_containers/bitset_ctor.cc
+ 5	0.000	183294	30795	1255531	23_containers/bitset_ctor.cc

-
+ 5	5.000	515474	40677	4071442	23_containers/multiset.cc

+ 3	0.000	183543	30251	1079036	23_containers/vector_capacity.cc
+ 2	0.000	179210	30251	1060164	23_containers/vector_capacity.cc

+ 12	0.010	537671	40261	4182091	23_containers/vector_ctor.cc
+ 8	0.000	529378	40293	4167503	23_containers/vector_ctor.cc

+ 4	0.010	183015	30293	1094003	23_containers/vector_modifiers.cc
+ 3	0.000	179066	30293	1079672	23_containers/vector_modifiers.cc

+ 11	0.000	526823	40645	4121462	24_iterators/istreambuf_iterator.cc
+ 8	0.000	522566	40805	4108922	24_iterators/istreambuf_iterator.cc

+ 13	0.000	193543	30379	1320925	24_iterators/iterator.cc
+ 9	0.000	188094	30379	1305597	24_iterators/iterator.cc

+ 8	0.000	518967	40165	4105427	26_numerics/binary_closure.cc
+ 6	0.000	515346	40709	4091003	26_numerics/binary_closure.cc

- 1	0.000	160764	29770	887991	26_numerics/c_math.cc
+ 1	0.000	167956	29813	930028	26_numerics/c_math.cc

+ 3	0.000	180071	30165	1033177	26_numerics/valarray.cc
+ 3	0.000	176502	30197	1018687	26_numerics/valarray.cc

- 9	0.000	528215	40453	4092662	27_io/filebuf.cc
- 9	0.000	524082	41733	4144614	27_io/filebuf.cc

+ 2	0.000	160892	29835	957881	27_io/fpos.cc
+ 2	0.010	167993	29931	999658	27_io/fpos.cc

+ 7	0.000	520727	40549	4079133	27_io/ios_base_callbacks.cc
+ 5	0.000	516230	40677	4067442	27_io/ios_base_callbacks.cc

+ 6	0.000	518967	40453	4055156	27_io/ios_base_members_static.cc
+ 5	0.000	514694	40581	4044913	27_io/ios_base_members_static.cc

+ 9	0.000	525255	40485	4085092	27_io/ios_ctor.cc
+ 6	0.000	521526	40581	4076406	27_io/ios_ctor.cc

+ 12	777.000	511271	40357	3942577	27_io/ios_manip_basefield.cc
+ 11	777.000	507126	41733	4000384	27_io/ios_manip_basefield.cc

+ 9	0.000	521543	40389	4080115	27_io/ios_manip_fmtflags.cc
+ 8	0.000	517666	41893	4139588	27_io/ios_manip_fmtflags.cc

+ 5	0.000	520023	40421	4015066	27_io/ios_members.cc
+ 5	0.000	516498	40453	4011472	27_io/ios_members.cc

+ 10	0.000	517367	40485	4098069	27_io/iostream_objects.cc
+ 9	0.000	513650	42213	4144577	27_io/iostream_objects.cc

+ 1	0.000	160204	29770	876791	27_io/istream.cc
+ 1	0.000	160180	29770	875967	27_io/istream.cc

+ 10	0.000	528199	40773	4114692	27_io/istream_extractor_arith.cc
+ 7	0.000	523190	40933	4097517	27_io/istream_extractor_arith.cc

+ 16	0.000	533831	40773	4145842	27_io/istream_extractor_char.cc
+ 9	0.000	529958	40901	4126657	27_io/istream_extractor_char.cc

+ 32	0.000	537879	40773	4188863	27_io/istream_extractor_other.cc
+ 20	0.000	530978	41989	4230533	27_io/istream_extractor_other.cc

+ 9	0.010	523127	40741	4105384	27_io/istream_manip.cc
+ 7	0.000	521286	41029	4102103	27_io/istream_manip.cc

+ 7	0.000	521527	40549	4077634	27_io/istream_sentry.cc
+ 6	0.000	517926	40677	4065232	27_io/istream_sentry.cc

+ 23	0.010	528647	40837	4007925	27_io/istream_unformatted.cc
+ 14	0.000	520534	40965	3999362	27_io/istream_unformatted.cc

+ 0	0.000	160204	29770	876791	27_io/ostream.cc
+ 0	0.000	160180	29770	875967	27_io/ostream.cc

+ 59	1.200	536567	42373	4138381	27_io/ostream_inserter_arith.cc
+ 38	1.200	530518	43717	4315356	27_io/ostream_inserter_arith.cc

+ 34	0.000	537031	40741	4121678	27_io/ostream_inserter_char.cc
+ 35	0.000	537718	42117	4301865	27_io/ostream_inserter_char.cc

+ 12	0.000	526103	41093	4119465	27_io/ostream_inserter_other.cc
+ 12	0.000	522678	42277	4173770	27_io/ostream_inserter_other.cc

+ 11	0.000	523767	40645	4108056	27_io/ostream_manip.cc
+ 8	0.000	520742	40933	4112822	27_io/ostream_manip.cc

+ 6	0.010	523863	40453	4025934	27_io/streambuf.cc
+ 4	0.010	519030	40549	4012518	27_io/streambuf.cc

+ 39	0.000	545335	40645	4258628	27_io/stringbuf.cc
+ 24	0.000	540934	40773	4284632	27_io/stringbuf.cc

+ 15	0.000	532599	41061	4167269	27_io/stringstream.cc
+ 11	0.010	529286	41157	4165561	27_io/stringstream.cc

+ 7	0.010	517047	40133	4071792	ext/headers.cc
+ 6	0.000	513794	40933	4086711	ext/headers.cc







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]