Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BrunoRNS/PyRAM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYRAM

Version: latest. Official site: https://github.com/BrunoRNS/PyRAM.

Description

PYRAM is a lightweight wrapper for PyPy 3.10 that runs your Python scripts directly from RAM for improved performance. It is optimized for server environments, includes Django, PyMySQL, and NumPy, and removes unnecessary components for a smaller footprint.

Installation

  1. Download the latest .deb package from the releases page.

  2. Install it:

    sudo dpkg -i PyRAM_[version].deb
  3. Run your script:

    sudo pyram /path/to/your_script.py

How It Works

  • Checks for root privileges (sudo is required to mount the RAM disk).
  • Mounts a RAM disk at /mnt/pyram_disk.
  • Extracts the PyPy binary from lib/pypy.so into the RAM disk.
  • Runs your script using PyPy, passing all arguments.
  • Cleans up after execution.

Benchmarks

Recent benchmarks show that PYRAM matches or slightly outperforms PyPy3 in most scenarios, especially right after boot or on slower disks, and both PyRAM and PyPy overtakes python in tests.

Test PYRAM Score PyPy3 Score Python3 Score
fibonacci 6.19 6.38 0.80
manual_sort 0.24 0.22 0.012
sum_large_list 5,025.11 1,513.10 274.99
matrix_multiplication 1,221.97 1,217.10 224.66
string_concat 3.29 1.49 249.38
Average Score 1251.36 547.66 149.97
  • PYRAM was faster in most tests and had a higher average score in recent runs.
  • For detailed charts and more info, see benchmarks/benchmarks.md.

PYRAM Fibonacci Benchmark PyPy3 Fibonacci Benchmark Python3 Fibonacci Benchmark

Documentation

For more information, advanced usage, and tips for adding libraries, see the documentation.

License

MIT License. See the LICENSE file for details.

Special Thanks

  • Python and PyPy development teams.
  • Professors, family, friends, and everyone who contributed or supported this project.

About

PYRAM - A lightweight PyPy wrapper for backend development, that runs in Random Access Memory

Topics

Resources

License

Stars

Watchers

Forks