Comments (3)
Hi, thanks for the hint!
In the build pipeline I still use Rust 1.58.1, because newer versions are affected by some performance regressions.
I did not yet have the time for further investigations, but perhaps the increased stack usage is also caused by some code optimization regression. In 1.58.1 the superfluous stack allocation gets optimized away and the allocation is done directly on the heap.
If you would like to compile the engine locally, I would recommend to use Rust 1.58.1 for now.
Using the Rust toolchain installer (rustup), you could run rustup override set 1.58.1
from inside the source folder. That way the old version is only used for that source folder.
from velvet-chess.
Today I investigated the issue a bit more. Starting with Rust 1.59.0, the unnecessary stack allocation does not get optimized away anymore. As a workaround I boxed each individual field of the NeuralNetParams struct, instead of the whole struct. This seemed to help the compiler/optimizer and now the struct instance is created directly on the heap again and the stack does not overflow anymore.
I could also mitigate some of the performance regressions by explicitly marking certain functions to be always inlined, but unfortunately binaries compiled with 1.63.0 are still around 8% slower than the ones produced by 1.58.1.
from velvet-chess.
Thanks. I will set Velvet to use 1.58.1 for the time being, and I'll check newer versions every so often for CCC. Can always reach out to me via email ([email protected]), or on Discord.
from velvet-chess.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from velvet-chess.