-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compress the MCTS tree #36
Comments
I pushed a branch bbc4464, that contains the suggested changes. Seems successful overall, but I am seeing a very high CPU utilization with most of the time spent in: This is the built-in If LLVM does not recognize the F16C instruction set then I will need to re-write some of the code in inline assembly to get acceptable performance. |
A side-effect of the memory saving we also seem to gain about a 25% performance improvement (with a Original
Small Node
|
Today a single instance of a
Node
is 10,688 bytes. For an average search tree, that contains 1,600 nodes, that is about 16 Mb. This is a bit excessive, and also causes some performance concerns during deallocation as:free()
is pretty expensive, and we bulk free entire sub-trees at a time.To avoid all of these issues I suggest that we change
Node
to a sparse representation, such that:f32
asf16
.i32
asi16
.This should reduce the average size to 928 bytes (a 10x reduction) and the run time of freeing a single
Node
by 46x. We will still need to bulk free a lot of these nodes at the same time, to solve this problem I suggest we keep a global object pool.The text was updated successfully, but these errors were encountered: