Hacker News new | ask | show | jobs
by jsjolen 2359 days ago
Sounds slow to use RPC with JSON for communication.

It seems that Racket does allow for C-to-Racket calls. You could write a glue program that generates C code that calls Racket functions and returns data, Swift code can then be generated to call that C code. That might be faster.

1 comments

Sending/receiving (plus encoding and decoding) one payload takes less than 100 microseconds on my machine. It's far from being a problem, although you're right that linking against a shared library and making the calls that way would be faster.