Skip to content

A Python C extension for primality test using 6k+-1 optimization

Notifications You must be signed in to change notification settings

moehmeni/primality-test-c-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primality test c extension

A Python module for primality test using 6k+-1 optimization written in C which is almost 37 times faster than the same function written in pure Python

Installation

python setup.py install

Usage

import prime
prime.is_prime(2147483647)

You can also run c_test.py and py_test.py Python programs in the tests directory to see the performance difference between pure Python code and this C extension

About

A Python C extension for primality test using 6k+-1 optimization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published