Re: A truth? patch + benchmarks

From: ts <decoux@...>
Date: 2002-08-02 07:20:50 UTC
List: ruby-core #286
>>>>> "C" == Christoph  <chr_news@gmx.net> writes:

C> static inline int
C> rb_truth_test(VALUE obj)
C> {
C>   if (~Qnil & obj) return 1;
C>   return 0;
C> }

 Well, personnally I've not found a difference between the macro and inline
 version (and the assembler generated was the same)

C> Not surprisingly, this version tested as fast or faster then
C> any of my other test candidates.

 You are sure that it's not an artefact ?



Guy Dcoux


In This Thread