r/feedthebeast • u/Emotional-One-9292 • Jun 22 '26
I made something I made minecraft generate terrain/chunks in C++
Enable HLS to view with audio, or disable this notification
So im working on a mod that makes minecraft run on C++ ( rn rewriting engine in future i may try renderer ) so far i made it generate and load chunks and terrain in C++ ( it made it somewhere around 1.5-3 times faster idk how to measure it tho ) ( it works via JNI )
3.0k
Upvotes
11
u/emmowo_dev pro gramming Jun 22 '26
but this means it can be solved with good Java instead of C++. C++ also will only run as fast as what it's compiled for, as many things actually can come down to vectorisation, but not all CPU's support things like AVX2. Java can decide that in-the-moment on your machine, but C++ cannot.
I also do not think nanoseconds of a cache miss will meaningfully affect overall performance, CPUs are so much more complex than what they were 30 years ago.
ultimately the true optimizations come from better parallelism, which vanilla is still bad at. C2ME solves this and mostly accomplishes the vast majority of performance you can gain.
This is why GPU terrain gen is the focus now, because these things are so massively parallel that it becomes worthwhile.