develooper Front page | perl.perl5.porters | Postings from November 2005

Re: XS-assisted SWASHGET (esp. for t/uni/class.t speedup)

Thread Previous | Thread Next
From:
SADAHIRO Tomoyuki
Date:
November 26, 2005 20:19
Subject:
Re: XS-assisted SWASHGET (esp. for t/uni/class.t speedup)
Message ID:
20051127131832.95B8.BQW10602@nifty.com
> (Btw, is the performance improvement after I rewrote t/uni/class.t or 
> after? I guess afterwards it is a bit lower but this is more because 
> class.t did less work (maybe calling swashget less often).

I took frequency of calling functions [table 1] and time [table 2]
during running t/uni/class.t.

class.t(curr.) is that in perl-current and
class.t(old) is that before Change 25020 by Tels.

[table 1]
                                      class.t(curr.)   class.t(old)
call swash_fetch (total)              2389418 times    2389418 times
use PL_last_swash_## (global cache)   2348218          2348218
use internal cache kept in swash        15357               85
create new swatch via swashget          25843            41115

*Certainly Tels' patch diminished the frequency of calling swashget.

[table 2]
                                       class.t(curr.)  class.t(old)
SWASHGET in XS,  /*save_re_context*/     12-12 sec      12-12 sec
SWASHGET in XS,    save_re_context       25-28          39-43
SWASHGET in perl,  save_re_context       32-34          54-56
(swash_get in C, /*save_re_context*/     11-12          11-12 )

These results are rough (just by using CORE::time() twice)
              and relative (must depend on machine spec).

save_re_context surrounded by /* */ (comment for C) means
that calling SWASHGET or swash_get does not accompany
calling save_re_context.

>>Parhaps SWASHGET may be able to recast as a C-level function
>>rather than XS. For example,

> I'd like to see that implemented. Cutting out one layer of subroutine 
> indirection can't hurt :)

perhaps soon..

Regards
SADAHIRO Tomoyuki



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About