arvindm95 / unladen-swallow

Automatically exported from code.google.com/p/unladen-swallow
Other
0 stars 0 forks source link

FDO: specialize isinstance() calls #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A number of our benchmarks (in particular html5lib and django) use isinstance() 
a lot. We should be able to use runtime feedback to specialize 
isinstance() calls if a) the given object and type are monomorphic, b) 
type(given_object) is given_type. We can probably use type versioning to relax 
(b).

Profile results:

bm_django.py -n --profile:

 66755634   34.295    0.000   34.295    0.000 {isinstance}

bm_html5lib.py -n 10 --profile

  4019908    2.249    0.000    2.249    0.000 {isinstance}

Original issue reported on code.google.com by collinw on 12 Jan 2010 at 2:36

GoogleCodeExporter commented 8 years ago
Doh, that should be "bm_django.py -n 100 --profile".

Also, it would be nice if the specialized versions of isinstance() contributed 
to type 
propagation via value propagation.

Original comment by collinw on 12 Jan 2010 at 2:40