|
From: Roger H. <rog...@mi...> - 2005-01-26 18:59:29
|
Firstly thanks to James for the clarification : > Unless you have a strategy for dealing with exceptions, and catching > them before they try to escape from the library, then use > new(std::nothrow), which is one of the standard versions of operator > new. I did already in e3fformat_3dmf_textreader_new. Secondly I have been running the old 'Sampler' tool on our application while it is refreshing the screen using the Microspot Renderer which of course uses Quesa. The list of where it spends most of its time is quite interesting. 9.7% of the time in sqrt. I have switched my renderer to use std::sqrtf as it only ever handle floats, never doubles. Hopefully will speed things up. 7.0% in one of my routines 6.2% in Q3Object_IsType 3.7% in OpaqueTQ3Object::GetClass 3.2% in another of my routines 3.0% in E3Object_IsType, so actually doing the work is quicker than Q3Object_IsType the glue routine above which checks parameters and calls us! 2.3% in OpqueTQ3Object::IsObjectValid 2.3% in E3ClassInfo::IsType I think in the release version we are checking out inputs too often, for instance in E3Shared_Acquire we check the parameter is of type shared. We then call Q3Shared_GetReference which again checks its parameter is of type shared. It also calls E3System_Bottleneck even though we must have come into E3Shared_Acquire from a Q3 routine which will have already called E3System_Bottleneck. My question is this, can I change the call to Q3Shared_GetReference into a call of E3Shared::GetReference (my preferred option) or can I remove the check in E3Shared_Acquire or should I leave it alone? Can I apply you answer to all similar situations or should I ask every time? Roger. |