Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import benchmarks from prior work #1

Open
33 of 37 tasks
bennn opened this issue Apr 13, 2023 · 6 comments
Open
33 of 37 tasks

Import benchmarks from prior work #1

bennn opened this issue Apr 13, 2023 · 6 comments

Comments

@bennn
Copy link
Member

bennn commented Apr 13, 2023

Two sources:

  1. Static Python https://github.com/facebookincubator/cinder/tree/0baa6051949aef10db8f02fca37005d48849aca9/Tools/benchmarks
  2. Reticulated performance https://github.com/nuprl/retic_performance/tree/master/benchmarks

TODO:

  • import the SP benchmarks that already have types
    • find way to organize between untyped / shallow typed / concrete typed / primitive typed
    • generate all combinations (what is all?)
    • import the SP benchmarks for all the files in the repo:
    • deltablue
    • fannkuch
    • nbody
    • nqueens
    • pystone
    • richards
  • import the Retic benchmarks, check that the types work in SP
    • start with pidigits, should be easy
    • 2nd, try spectralnorm
    • go
    • http2
    • slowsha
    • Espionage
    • Evolution
    • PythonFlow
    • aespython
    • call_method
    • call_method_slots
    • call_simple
    • chaos
    • fannkuch
    • float
    • futen
    • meteor
    • nbody
    • nqueens
    • pystone
    • sample_fsm
    • sieve
    • stats
    • take5
  • try adding types to other SP benchmarks
  • look for new benchmarks
@bennn
Copy link
Member Author

bennn commented May 11, 2023

@vivaan2006 for next time (05/10):

  • make a new file Benchmarks/spectralnorm/untyped/main.py, copy in spectralnorm and remove all types, make sure it runs with normal python
  • make file Benchmarks/spectralnorm/shallow/main.py, copy in spectral norm, type updating the types for Static Python
    • List(T) chages to List[T]
    • all files need standard imports from __static__
    • every variable declaration needs a type
  • try the same for float: make untyped & shallow versions, check than untyped runs

@bennn
Copy link
Member Author

bennn commented May 25, 2023

Great job with spectralnorm and float.

Try Espionage for next time.

@bennn
Copy link
Member Author

bennn commented Jun 8, 2023

For next time, try the c benchmarks: call_x and chaos

@mrigankpawagi
Copy link
Contributor

mrigankpawagi commented Jun 2, 2024

Though there is a lot of overlap, there are some more benchmarks with PyPy and with pyperformance.

@mrigankpawagi
Copy link
Contributor

mrigankpawagi commented Jun 3, 2024

I was actually able to run pyperformance on Python 3.10.5+cinder, although I had to use release 1.0.8 (so pip install pyperformance==1.0.8) since the next version introduced changes to a few benchmarks that work only with Python 3.11+.

There was one error related to nargs, in the msgpack module. This was "fixed" by changing Packer(**kwargs).pack(o) to Packer(**kwargs).pack.__call__(o) in L36 of the module's __init__.py (the version being that installed by pyperformance). I think we can include these benchmarks as well to this repository. The pyperformance module comes with a driver like the one we need.

PS one of the benchmarks in this is django_template which is a very simple benchmark but it runs (reconfirming that Django indeed can work with static-python).

@bennn
Copy link
Member Author

bennn commented Jun 3, 2024

Ok, both these leads sound great (pyperformance + django)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants