What you could do is cache the result of `CSTR2SYM` calls in a static variable. Would be a tiny performance benefit, but I'm not sure if that's worth it. See https://github.com/libgit2/rugged/blob/6f54754c9aeff59feb8c4a022532b699d621eedc/ext/rugged/rugged_blob.c#L31 for an example.