AnOpenSauceDev / FastRandom

An optimized rewrite of Minecraft's RNG system, for Fabric!
Apache License 2.0
49 stars 3 forks source link

Faster Random is no longer being *actively* maintained #12

Closed AnOpenSauceDev closed 9 months ago

AnOpenSauceDev commented 1 year ago

What? I thought Faster Random was already dead!

Yes, and no. Faster Random was archived because I thought that it had no performance gain, but looking back i was actually very wrong, and for random operations, there was a 100x performance boost on average. I plan on releasing a "fix all bugs with 1.3" version of Faster Random (hence me "un-archiving" this mod), and port everything to a newer version of Minecraft. The half-done entity optimizations probably wont be finished by me, purely because i can't be bothered to.

Does this mean no more updates still?

Kind of... I plan on updating this occasionally to fix bugs, but probably nothing outside of that.

If anyone wants to take over development, I'll probably give write access and membership on modrinth (as long as I'm sure you wont destroy everything, and are capable of maintaining this mod). But aside from that, expect the occasional bugfix, and possibly a handful of version updates.

AnOpenSauceDev commented 1 year ago

I plan to optimize a couple of the random generators at some point, mainly because chunk generation is blocked the most by the following: - BaseRandom (nextInt) - CheckedRandom (next)

using XoRoShiRo would slightly improve performance, but at the cost of breaking chunk generation even more, and the performance loss is more caused by the number of calls for noise-related things.

DeshiDesu commented 11 months ago

Massively underrated mod. Props to you for reviving this mod again 😊

AMDYep commented 10 months ago

Has the performance optimization of the mod been measured? I tried the mod, but there was no noticeable change in my fps, mspt, etc.

AnOpenSauceDev commented 10 months ago

Most of Faster Random's Random calls are done during world generation, or during events that don't happen every frame. So faster worldgen and better 1% lows on weaker hardware would be noticable. As for the speed of the random system, you should be able to see the objective performance of *CheckedRandom vs ThreadLocalRandom, of which I see about 100X faster Floating-point generation.

*Correction, I said java.util.random, when I actually benchmarked against CheckedRandom