Hmm... If I was to write an instance, I could use C++, or perhaps, Go.
Though if it was Go, I would have to use a fair bit of off-heap memory.
The garbage collector can be fairly resource intensive (from what I remember, it scans every pointer on the heap). That was the reason Discord abandoned it for another language in one area.
Off-cheap memory would use something like a mmap syscall and unsafe to cast memory back and forth.
It's probably still more efficient than the higher level languages.