develooper Front page | perl.perl6.internals | Postings from December 2001

[COMMIT] Predereferencing gets a boost

From:
Gregor N. Purdy
Date:
December 18, 2001 12:13
Subject:
[COMMIT] Predereferencing gets a boost
Message ID:
1008705708.2318.0.camel@borg.oh.focusresearch.com
All --
I just committed some performance-enhancing changes to the
predereferencing code path. The commit message follows after
some notes on the performance results here.
Without optimization:
 Before the change:
 ./test_parrot examples/assembly/mops.pbc --> 23.02
 ./test_parrot -P examples/assembly/mops.pbc --> 29.96 [+30.0%]
 After the change:
 ./test_parrot examples/assembly/mops.pbc --> 24.02 [+ 4.3%]
 ./test_parrot -P examples/assembly/mops.pbc --> 32.40 [+40.7%]
With optimization (gcc -O9):
 Before the change:
 ./test_parrot examples/assembly/mops.pbc --> 43.53
 ./test_parrot -P examples/assembly/mops.pbc --> 45.67 [+ 4.9%]
 After the change:
 ./test_parrot examples/assembly/mops.pbc --> 43.53 [+ 0.0%]
 ./test_parrot -P examples/assembly/mops.pbc --> 48.87 [+12.3%]
-----------
Performance improvements to the predereferencing code path 
suggested to me over lunch yesterday by my friend John Kennedy.
The goal is to remove the additional test in the inner loop
that was checking for NULL to decide whether or not to call
the prederef() function. Also moved pc & pc_prederef syncing
outside the innner loop.
 * Changed the prototype of the prederef() function in
 interpreter.c to match that of an opfunc.
 * Instead of initializing the prederef void * array with NULL,
 we initialize it with pointers to prederef().
 * prederef() now returns the prederef_pc passed in, so that
 after predereferencing, the same location is executed, but now
 with the real code being called.
Thanks to: John Kennedy
Regards,
-- Gregor
 ____________________________________________________________________ 
/ Inspiration >> Innovation >> Excellence (TM) \
 Gregor N. Purdy gregor@focusresearch.com
 Focus Research, Inc. http://www.focusresearch.com/
 8080 Beckett Center Drive #203 513-860-3570 vox
 West Chester, OH 45069 513-860-3579 fax
\____________________________________________________________________/
[finest@newyork.ny.us]$ ping osama.taliban.af
PING osama.taliban.af (68.69.65.68) from 20.1.9.11 : 56 bytes of data.
From 85.83.77.67: Time to live exceeded


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

AltStyle によって変換されたページ (->オリジナル) /