bugKawa - Bugs: bug #16388, performance regression

 
 

bug #16388: performance regression

Submitter:  tk <huh>
Submitted:  Wed 19 Apr 2006 10:12:39 PM UTC
   
 
Category:  Code generation Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 27 Apr 2006 02:37:29 AM UTC, comment #3: 

I changed it so that Kawa will compile a module if it contails a lambda definition, including the loops in your example.
This uncovered various problems I had to fix.

Per Bothner <bothner>
Group administrator
Thu 20 Apr 2006 02:32:42 PM UTC, comment #2: 


thanks, this clearly isn't a bug, performance is still quite good when the code is compiled. 

I prefer the default-compile policy, primarily because it provides more consistent/predictable performance, but as long as it's possible to specify I'm flexible on this. Another important issue is having strict control over whether code to be executed passes through the kawa classloader.

thanks for the quick solution.

tk <huh>
Wed 19 Apr 2006 10:31:50 PM UTC, comment #1: 

I suspect this isn't a performance regression in the way you think.  Rather it is that before this code was compiled and now it is interpreted.  It's a new feature: 'let' and 'lambda' forms can now be interpreted, which permits some macro functionality that wasn't permitted before.

You could verify this by setting the alwaysCompile field in ModuleExp to true.

That does lead to the policy question of when interactively loaded code should be compiled and when it should be interpreted.  Perhaps the default should be to compile, except perhaps for the very simplest expressions.

"perhaps we should begin adding some performance checks to the test suit"
I have started doing that.  See check-inlining in the second-level testsuite directory.

Per Bothner <bothner>
Group administrator
Wed 19 Apr 2006 10:12:39 PM UTC, original submission:  


example of a substantial performance regression from
kawa1.7 to kawa1.8a (latest CVS):

version 1.7:
#|kawa:93|# (time (let loop ((i 1000000)) (if (> i 0) (loop (- i 1)))))
269 ms elapsed

#|kawa:94|# (time (let loop ((i :: <int> 1000000)) (if (> i 0) (loop (- i 1)))))
6 ms elapsed


version 1.8a:
#|kawa:47|# (time (let loop ((i 1000000)) (if (> i 0) (loop (- i 1)))))
6931 ms elapsed

#|kawa:48|# (time (let loop ((i :: <int> 1000000)) (if (> i 0) (loop (- i 1)))))
6795 ms elapsed



perhaps we should begin adding some performance checks to the test suite

tk <huh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-04-27 bothner StatusNone Fixed
    Open/ClosedOpen Closed
2006-04-19 bothner Assigned toNone bothner

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code