IIRC more memory also increases GC time so after a certain point the GC causes such annoying lagspikes it's often better to play with less.
Additionally, the server isn't multithreaded. It benefits always from having the fastest clocked CPU you can throw at it.
Client performance can be greatly improved by using Optifine.
I would love to have a more-well-built version (as I think the core of Bedrock is), but Mojang has taken some weird steps where things like redstone mechanics are severely limited compared to the Java edition... and they have no intention on fixing it. Now you've got these weird minor differences that will never merge and you'll never get those players to switch versions.
https://www.reddit.com/r/Minecraft/comments/64vrom/psa_c_edi...
https://www.minecraft.net/en-us/article/scripting-api-now-pu...
https://minecraft.gamepedia.com/Bedrock_Edition_beta_scripti...
It’s neat, but even by previous FAQ response standards it’s horribly weak. It appears like little more than an ability to make scripts of existing vanilla commands. You can’t make/register blocks, fluids, modify terrain gen, or even trigger individual events. As a framework it isn’t useful for content creators.