Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Is there a better or faster way to send text from Rust to js? #2
FWIW I don't believe there's any way to avoid the copying overhead right now. That being said, though, I'm sure there's some construction of JS which is the fastest way to copy data (least bound checks, etc), but I haven't benchmarked to see what's best yet :)
Overall I wouldn't worry too much in general, and once it starts showing up in a profile I believe the solution for now is "figure out how to copy less often" rather than "figure out how to copy faster"