Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sachaa-thanasius/fastercast
https://github.com/sachaa-thanasius/fastercast
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sachaa-thanasius/fastercast
- Owner: Sachaa-Thanasius
- License: mit
- Created: 2024-07-13T00:43:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-13T02:59:54.000Z (6 months ago)
- Last Synced: 2024-07-14T02:26:28.326Z (6 months ago)
- Language: C
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==========
fastercast
==========An attempt at making Python's `typing.cast `_ faster by writing in C.
Random Benchmark
---------------
Calculated by running ``python benchmark.py`` on Windows 10 (WSL). It's not comprehensive, but it shows potential:Python3.9::
python version: 3.9
---- Testing with type: list[int] ----
typing.cast: 3.465584092999052
fastercast.cast: 1.9172640960023273
no cast: 1.4130047959988588---- Testing with type: ----
typing.cast: 3.4464493919986126
fastercast.cast: 1.9092626999990898
no cast: 1.4313703090010677---- Testing with type: 'list' ----
typing.cast: 3.424010521001037
fastercast.cast: 1.9051031120034168
no cast: 1.463806901996577Python3.12::
python version: 3.12
---- Testing with type: list[int] ----
typing.cast: 2.0208555909994175
fastercast.cast: 1.5888119939991157
no cast: 1.2391334939966328---- Testing with type: ----
typing.cast: 2.0552524880004057
fastercast.cast: 1.558741792003275
no cast: 1.2164903929988213---- Testing with type: 'list' ----
typing.cast: 2.1068942889978644
fastercast.cast: 1.5963142889995652
no cast: 1.226719090998813