8 attach_function :getuid, [], :uid_t
12 puts "uid=#{Process.pid} Posix.getuid=#{Posix.getuid}"
13 puts "Benchmark FFI getuid performance, #{iter}x calls"
16 puts Benchmark.measure {
17 iter.times { Posix.getuid }
20 puts "Benchmark Process.uid performance, #{iter}x calls"
22 puts Benchmark.measure {
23 iter.times { Process.uid }