Discussion:
[omniORB] omniORB 4.1 patch: optimize default constructed any
Teemu Torma
2007-04-30 04:14:41 UTC
Permalink
We are using a union to represent range of different valuse. CORBA::Any
is one of the choices that is rarely used, but when running callgrind
the union constructor was using notable amount of time which was
dominated by CORBA::Any default constructor.

The attached patch does not assign tc_null as the default typecode but
leaves the typecode nil instead and handles this on the access time
instead. Duplicating typecodes takes a mutex which is the slow part.
With this patch, CORBA::Any default constructor and the union
constructor dropped below the callgrind ?radar screen.?

Teemu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniorb-any.patch
Type: text/x-diff
Size: 10306 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070430/d4a58571/omniorb-any.bin
Duncan Grisby
2007-05-11 15:53:24 UTC
Permalink
Post by Teemu Torma
We are using a union to represent range of different valuse. CORBA::Any
is one of the choices that is rarely used, but when running callgrind
the union constructor was using notable amount of time which was
dominated by CORBA::Any default constructor.
The attached patch does not assign tc_null as the default typecode but
leaves the typecode nil instead and handles this on the access time
instead. Duplicating typecodes takes a mutex which is the slow part.
With this patch, CORBA::Any default constructor and the union
constructor dropped below the callgrind ?radar screen.?
Thanks. I've checked in your patch.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...