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]
Other format: [Raw text]

Re: GCC 3.4.0 040128 + GCC 3.3.2 compile-time performance comparisonon MICO project sources.


On Thu, 29 Jan 2004, Karel Gardas wrote:

> 1) typecode.cc: -O2, -O3, -Os

I have just tried binary search to find out what's the culprit of slowdown
in this file and come to the interesting observation. Whole file without
one piece compiles in 20s at -O2, with this problematic piece it takes
34-35s. The problematic code looks:

#define SYSEXC(exname)							   \
	{								   \
	    CORBA::StructMemberSeq ss;					   \
	    ss.length (2);						   \
									   \
	    ss[0].name = (const char *)"minor";				   \
	    ss[0].type = CORBA::_tc_ulong;				   \
	    ss[0].type_def = 0;						   \
									   \
	    ss[1].name = (const char *)"completed";			   \
	    ss[1].type = _tc_CompletionStatus;				   \
	    ss[1].type_def = 0;						   \
									   \
	    CORBA::_tc_ ## exname = CORBA::TypeCode::create_exception_tc ( \
		"IDL:omg.org/CORBA/" #exname ":1.0",			   \
		#exname,						   \
		ss)->mk_constant();					   \
	}

#include <mico/sysexc.h>
#undef SYSEXC


And file mico/sysexc.h looks:

SYSEXC (UNKNOWN)
SYSEXC (BAD_PARAM)
SYSEXC (NO_MEMORY)
SYSEXC (IMP_LIMIT)
SYSEXC (COMM_FAILURE)
SYSEXC (INV_OBJREF)
SYSEXC (NO_PERMISSION)
SYSEXC (INTERNAL)
SYSEXC (MARSHAL)
SYSEXC (INITIALIZE)
SYSEXC (NO_IMPLEMENT)
SYSEXC (BAD_TYPECODE)
SYSEXC (BAD_OPERATION)
SYSEXC (NO_RESOURCES)
SYSEXC (NO_RESPONSE)
SYSEXC (PERSIST_STORE)
SYSEXC (BAD_INV_ORDER)
SYSEXC (TRANSIENT)
SYSEXC (FREE_MEM)
SYSEXC (INV_IDENT)
SYSEXC (INV_FLAG)
SYSEXC (INTF_REPOS)
SYSEXC (BAD_CONTEXT)
SYSEXC (OBJ_ADAPTER)
SYSEXC (DATA_CONVERSION)
SYSEXC (OBJECT_NOT_EXIST)
SYSEXC (TRANSACTION_REQUIRED)
SYSEXC (TRANSACTION_ROLLEDBACK)
SYSEXC (INVALID_TRANSACTION)
SYSEXC (INV_POLICY)
SYSEXC (CODESET_INCOMPATIBLE)


IMHO this is not that many code-lines added, but my idea is that many
blocks opened/closed might cause some troubles to the optimizer.

Cheers,

Karel
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com


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