Click here to Skip to main content
15,903,201 members
Articles / General Programming / Performance

Python, Min-cost Max-flow, and a Loose End

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
27 May 2020CPOL4 min read 10K   2  
My status report while trying to understand why the exact same code Runs 1000s (not kidding) of times slower in Python
There was this particular weighted matching problem that I needed to solve some time ago. I reduce the whole thing to min-cost flow, similar to what one would do for a normal max matching. My C++ implementation would give me the answer almost instantly on a synthesized small input and in a few minutes on my actual data. But in Python, it was much, much slower. This article explores why.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Canada Canada
I make things faster.

https://blog.farnasirim.ir

Comments and Discussions