From: Vincent Fourmond Date: 2006-12-30T09:10:23+09:00 Subject: Re: Methods validating their arguments: good or bad? Phrogz wrote: > Phrogz wrote: >> When the debug flag is supplied, the block is yielded and run. When >> not, the entry_check call still does have the overhead of a do-nothing >> method call, but far less than before. > > Rehearsal ------------------------------------------------------ > no_test 2.930000 0.020000 2.950000 ( 2.999768) > dead_method_call 4.030000 0.050000 4.080000 ( 4.232545) > test_inline 4.830000 0.050000 4.880000 ( 5.065821) > test_through_block 6.100000 0.050000 6.150000 ( 6.227374) > -------------------------------------------- total: 18.060000sec > > user system total real > no_test 2.920000 0.020000 2.940000 ( 2.971835) > dead_method_call 3.910000 0.030000 3.940000 ( 3.990496) > test_inline 4.750000 0.040000 4.790000 ( 4.825439) > test_through_block 6.140000 0.050000 6.190000 ( 6.263266) Well, that is something, but that really calls for a dedicated implementation, unless the performance loss isn't that great with Yarv. A dedicated implementation could run with hardly any overhead, and that would be fantastic. Actually, if that interest some people, I'd like to give it a try. Vince -- Vincent Fourmond, PhD student http://vincent.fourmond.neuf.fr/