AFAIK with the latest JIT in some contexts pure Ruby can be faster than using C libraries, just because the VM can be better optimized and there is no overhead in moving data between the two realms.
I don't recall exactly where I read it, but I think was a while ago when they announced one of the newest JIT engines.