Hi,

I made some tests with pythonOCC and with the pure C++ OCE. According
to my measurements the 'same' code in python is about 10 times slower
than the C++ code. For example the following python code:

for i in xrange(10000):
        p = gp_Pnt(0,0,0)
        face = 
BRepBuilderAPI_MakeFace(gp_Sphere(gp_Ax3(p,gp_Dir(1.,0.,0.)),50.)).Face()

compared to the C++ code:

for (int i = 0; i<10000; ++i) {
        gp_Pnt p(0,0,0);
        gp_Sphere sphere(gp_Ax3(p,gp_Dir(1.,0.,0.)),50.);
        TopoDS_Face face = BRepBuilderAPI_MakeFace(sphere).Face();
    }

The python version is about 8 times slower if I turn off the gc and
about 10 times if I turn it on.

Does anybody have any perfomance tips to make the pythonOCC code faster?

István

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to