iirc, the code looks at the mod time of the .so compiled from the inlined C code vs the mod time of the file containing the inlined C to decide whether to compile a new .so -pate On Wed, 11 Sep 2002, Tom Gilbert wrote: > * Pat Eyler (pate / eylerfamily.org) wrote: > > <507> ./example.rb slow > > RubyInline 1.0.4 > > Type = Native, Iter = 1000000, time = 24.01048500 sec, 0.00002401 sec / > > iter > > <508> ./example.rb > > RubyInline 1.0.4 > > Building /tmp/Mod_MyTest_fastfact.so with 'cc -shared -O -pipe -fPIC > > -I /usr/local/lib/ruby/1.6/i386-freebsd4' > > Type = Inline, Iter = 1000000, time = 5.40564900 sec, 0.00000541 sec / > > iter > > <509> ./example.rb > > RubyInline 1.0.4 > > Type = Inline, Iter = 1000000, time = 5.27179200 sec, 0.00000527 sec / > > iter > > So looking at this example, I guess on the second "nonslow" run it found > /tmp/Mod_MyTest_fastfact.so there already and reused it? > > I haven't looked at the sources or anything, so I'm just going from this > one example, but what would have happened if a naughty user had come > along first and created a /tmp/Mod_MyTest_fastfact.so that Did Mean > Things? > > Tom. > -- > .^. .-------------------------------------------------------. > /V\ | Tom Gilbert, London, England | http://linuxbrit.co.uk | > /( )\ | Open Source/UNIX consultant | tom / linuxbrit.co.uk | > ^^-^^ `-------------------------------------------------------' >