1 / 12

Effectiveness of an Automatic Insertion of Safe Memory Reuses into ML-like Programs

Effectiveness of an Automatic Insertion of Safe Memory Reuses into ML-like Programs. Oukseh Lee and Kwangkeun Yi {oukseh; kwang}@ropas.snu.ac.kr Seoul National University January 12, 2004. *.

nikita
Download Presentation

Effectiveness of an Automatic Insertion of Safe Memory Reuses into ML-like Programs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Effectiveness of an Automatic Insertion of Safe Memory Reuses into ML-like Programs Oukseh Lee and Kwangkeun Yi {oukseh; kwang}@ropas.snu.ac.kr Seoul National University January 12, 2004

  2. * Oukseh Lee, Hongseok Yang, and Kwangkeun Yi. Inserting Safe Memory Reuse Commands into ML-like Programs. In Proceedings of the Annual International Static Analysis Symposium, volume 2694 of Lecture Notes in Computer Science, pp. 171-188, San Diego, California, June 2003. Question • Our SAS 2003 paper* presented • an algorithm to replaceallocations by memory reuse (or destructive update); and • some promising yet preliminary experiment numbers. • When and how much is it cost-effective? • Space & time-wise. • Before launching it inside our nML compiler.

  3. 4 result 1 2 3 fun insert b i l = case l of [] => i::[] | h::t => if i<h then i::l else let z = insert b i t in free l when b; h::z l Example: insert insert 5 l 4 6 1 2 3 5 result 4 1 2 3 fun insert i l = case l of [] => i::[] | h::t => if i<h then i::l else let z = insert i t in h::z

  4. Analysis & Transformation Cost slope=1.46 1,500~29,000 lines/sec

  5. Reuse Ratio 3.8%~88.6% of allocations are avoided.

  6. Memory Peak Reduction much reuse = much peak reduction 0.0%~71.9% peak reduction

  7. Difference in Live Cells sieve (85.7%) qsort (83.7%) merge (50.0%) msort (88.6%)

  8. Difference in Live Cells queens (5.2%) kb (3.8%) k-eval (31.5%) nucleic (17.7%)

  9. Difference in Live Cells life (8.7%) mirage (84.4%)

  10. 50.0% 83.7% 81.3% 64.5% 16.0% 17.5% 5.2% -6.0% -6.7% 88.6% 50.7% 3.4% 84.4% 3.9% -21.6% 31.5% 1.2% -5.3% 3.8% -3.9% -4.9% 50.0% 83.7% 71.7% 69.9% 4.2% 25.4% 5.2% -3.0% -6.1% 88.6% 54.4% 10.3% 84.4% 5.2% -42.9% 31.5% 1.7% -17.1% 3.8% -5.0% -7.5% GC-time & Runtime Changes -1.6%~88.5% GC-time reduction -42.9%~25.4% runtime reduction High reuse ratio & Big GC-time portion: runtime reduction Low reuse ratio: flags overhead High reuse ratio & Small GC-time portion: expansive reuse in the Objective Caml system

  11. GC-time & Runtime Changes much reuse = much GC-time reduction much reuse & big GC-time portion = much runtime reduction

  12. high reuse ratio memory peak reduction runtime speedup Answer transformation result program performance program not much sharing + big GC-time portion

More Related