Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jewishlewish/layla-python-module
Python Module that uses C code to speed up evaluation
https://github.com/jewishlewish/layla-python-module
c python pythoneval
Last synced: about 2 months ago
JSON representation
Python Module that uses C code to speed up evaluation
- Host: GitHub
- URL: https://github.com/jewishlewish/layla-python-module
- Owner: JewishLewish
- Created: 2023-01-01T00:37:11.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-02T23:27:07.000Z (about 2 years ago)
- Last Synced: 2024-11-15T23:09:17.356Z (about 2 months ago)
- Topics: c, python, pythoneval
- Language: Python
- Homepage: https://pypi.org/project/Layla-Eval/
- Size: 184 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Layla Mathematics is a python package that uses the code of C to make the eval syntax faster and more flexible.
Benchmarking: https://github.com/JewishLewish/Layla-Python-Module/blob/master/testing.py
Benchmark test:
-> Loop 100,000 times
-> Each time having an unique variable / outputOutput:
i + 2:Python's Eval -> .90 seconds
Layla's Math -> .15secondsi + abs(i):
Python's Eval -> ~1.04 seconds
Layla's Math -> ~.14 seconds
i + sin(i):
Python's Eval DOESN'T SUPPORT IT
Layla's C Math -> ~.15 secondsLayla Mathematics is mostly used for heavy mathematics.
### Syntax
```
x = layla.math("2+2")
print(x) #-> 4
```