Skip to content

Performance Comparison of Difference Calculation in C++ and C# #61

Description

@airsxue

Hello,

Thank you for your great work. We tested the difference calculation time using the following polygon data (input1 and input2), and found that the total solving time for running the same code (difference/Exclude calculation) for 100,000 times was approximately 134,354ms. We believe that this time is quite long. Could you please let us know if this running efficiency is normal in C++? We are not sure if there is any issue with how we are calling the C++ code. Thank you very much for your help.

input1.addVertex({ 0, 0, 0 });
input1.addVertex(260.9419, 0.0000, 0);
input1.addVertex(332.7787, 85.6275, 0.5310);
input1.addVertex(266.1260, 159.6569, -0.5375);
input1.addVertex(176.8855, 196.6716, 0);
input1.addVertex(80.9798, 121.9019, -0.1873);
input1.addVertex(5.8104, 99.3229, 0);
input1.addVertex(78.3877, 48.9830, 0);


input2.addVertex(0, 71.8685, 0);
input2.addVertex(33.8413, 14.0612, 0.5257);
input2.addVertex(80.5336, 10.6356, -0.2735);
input2.addVertex(125.9409, 27.7637, 0);
input2.addVertex(58.6867, 46.1764, -0.6131);
input2.addVertex(83.9606, 82.1453, 0.5310);
input2.addVertex(100.2387, 124.9655, 0);

CombineResult<double> unionResult = cavc::combinePolylines(input1, input2, PlineCombineMode::Exclude);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions