From: Haejoong L. <hae...@un...> - 2002-04-02 00:52:35
|
Hi Steve, I've managed to directly wrap AGAPI.h. I'm attaching corresponding swig interface file (AGAPI.i). Mapping tcl array to c++ map was a little tricky. Only one function hasn't been wrapped; I still need to write a typemap from c++ list to tcl/python list, which is required to wrap StoreSQLs() function. Another remaining task is to make the new wrapper use a namespace. I measured the performance change. The improvement looks significant (see below). Any suggestions or questions are more than welcome. Thanks, Haejoong Your result with the old wrapper: > getting start times for 3 nodes > [::AG_GetAnchorOffset [::AG_GetStartAnchor $entry]]: 10650 microseconds per > teration > [::AG_GetStartAnchor $entry]: 6104 microseconds per iteration Using the old wrapper: getting start times for 3 nodes [AG_GetAnchorOffset [AG_GetStartAnchor $entry]]: 12630 microseconds per iteration [AG_GetStartAnchor $entry]: 7498 microseconds per iteration Using the new wrapper: getting start times for 3 nodes [GetAnchorOffset [GetStartAnchor $entry]]: 274 microseconds per iteration [GetStartAnchor $entry]: 232 microseconds per iteration 5 nodes: getting start times for 5 nodes [GetAnchorOffset [GetStartAnchor $entry]]: 431 microseconds per iteration [GetStartAnchor $entry]: 351 microseconds per iteration |