bupticybee / TexasSolver

🚀 A very efficient Texas Holdem GTO solver :spades::hearts::clubs::diamonds:
https://bupticybee.github.io/texassolver_page
GNU Affero General Public License v3.0
1.71k stars 304 forks source link

Memory usage C++ vs Java and speed #6

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi, you mention that the C++ version is slower for flop solves than the Java version. Do they use similar amounts of memory? Also roughly how much slower?

Thanks for really neat software to play with.

ghost commented 3 years ago

Ah looks like you have posted this information elsewhere,

for those interested "c++ implement exact the same algorithm, it runs at least 3 times faster and requires at least 3 times smaller memory, but that's not enough . I'm current aggressively trying to optimize it to be even faster."

So definitely worth using the C++ version for those interested in speed and memory efficiency.

bupticybee commented 3 years ago

Thats old information. I spend a lot of time optimize it, now the speed of cpp version is 5x at least and memory usage is even fewer than 1/3 of java version.

bupticybee commented 3 years ago

Closing because the issue is considered solved.

tankche1 commented 2 years ago

@bupticybee Can you explain a bit about the bottleneck of the speed?

I am considering build a python version. Do you think there will be a huge problem with speed?

bupticybee commented 2 years ago

@bupticybee Can you explain a bit about the bottleneck of the speed?

I am considering build a python version. Do you think there will be a huge problem with speed?

There will be huge problem using python, it's not a suitable language for solvers. I used to use python to build prototype of this solver, and eventually I translate everything to java, and then c++. Python is NOT suitable for this job, if you use python, you will soon find everything is a bottleneck, interpreter, lack of type system, speed, memory, you name it.