Daemon C extension instead of very slow ffi implementation