All Projects → scivision → python-performance

scivision / python-performance

Licence: MIT License
Performance benchmarks of Python, Numpy, etc. vs. other languages such as Matlab, Julia, Fortran.

Programming Languages

python
139335 projects - #7 most used programming language
fortran
972 projects
CMake
9771 projects
matlab
3953 projects
Meson
512 projects
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to python-performance

latenz
JavaScript HTTP latency analyzer
Stars: ✭ 18 (-25%)
Mutual labels:  benchmark
serializer-benchmark
A PHP benchmark application to compare PHP serializer libraries
Stars: ✭ 14 (-41.67%)
Mutual labels:  benchmark
clj-perf-tips
Clojure performance tips
Stars: ✭ 14 (-41.67%)
Mutual labels:  benchmark
rop-benchmark
ROP Benchmark is a tool to compare ROP compilers
Stars: ✭ 23 (-4.17%)
Mutual labels:  benchmark
c2clat
A tool to measure CPU core to core latency
Stars: ✭ 37 (+54.17%)
Mutual labels:  benchmark
inspec-gke-cis-benchmark
GKE CIS 1.1.0 Benchmark InSpec Profile
Stars: ✭ 27 (+12.5%)
Mutual labels:  benchmark
CARLA
CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms
Stars: ✭ 166 (+591.67%)
Mutual labels:  benchmark
node-red-contrib-actionflows
Provides a set of nodes to enable an extendable design pattern for flows.
Stars: ✭ 38 (+58.33%)
Mutual labels:  benchmark
Unchase.FluentPerformanceMeter
🔨 Make the exact performance measurements of the public methods for public classes using this NuGet Package with fluent interface. Requires .Net Standard 2.0+. It is an Open Source project under Apache-2.0 License.
Stars: ✭ 33 (+37.5%)
Mutual labels:  benchmark
javascript-serialization-benchmark
Comparison and benchmark of JavaScript serialization libraries (Protocol Buffer, Avro, BSON, etc.)
Stars: ✭ 54 (+125%)
Mutual labels:  benchmark
npm-yarn-benchmark
Bash script for comparing NPM and Yarn performance
Stars: ✭ 42 (+75%)
Mutual labels:  benchmark
elixir port benchmarks
Quick-and-dirty benchmarks for using Ports to communicate with various languages.
Stars: ✭ 24 (+0%)
Mutual labels:  benchmark
jmeter-grpc-plugin
A JMeter plugin supports load test gRPC
Stars: ✭ 36 (+50%)
Mutual labels:  benchmark
krun
High fidelity benchmark runner
Stars: ✭ 70 (+191.67%)
Mutual labels:  benchmark
mqtt-mock
mqtt压测工具。支持subscribe、publish压测方式,支持模拟客户端连接数。
Stars: ✭ 78 (+225%)
Mutual labels:  benchmark
RGBD-SODsurvey
RGB-D Salient Object Detection: A Survey
Stars: ✭ 171 (+612.5%)
Mutual labels:  benchmark
minhash-lsh
Minhash LSH in Golang
Stars: ✭ 20 (-16.67%)
Mutual labels:  benchmark
p3arsec
Parallel Patterns Implementation of PARSEC Benchmark Applications
Stars: ✭ 12 (-50%)
Mutual labels:  benchmark
Turbo-Histogram
Fastest Histogram Construction
Stars: ✭ 44 (+83.33%)
Mutual labels:  benchmark
go-plugin-benchmark
Benchmark comparing the go plugin package to other plugin implementations
Stars: ✭ 18 (-25%)
Mutual labels:  benchmark

Python Performance

Actions Status

All benchmarks are platform-independent (run on any computing device with appropriate hardware). CuPy tests require an NVIDIA GPU with CUDA toolkit installed.

Install

This command prepares Python prereqs:

pip install -e .

Using the C and/or Fortran tests requires compilation using CMake.

cmake -B build

cmake --build build

cd build

ctest

Usage

Iterative benchmarks, here using the pisum algorithm:

python Pisum.py

Pi (Machin) benchmark Windows 10 Intel 19.1

Pi (Machin) benchmark Windows 10

Pi (Machin) benchmark

Matrix Multiplication benchmarks:

python Matmul.py

Hypotenuse

Observe that hypot() is faster from 1 to a few hundred elements, then sqrt(x^2+y^2) becomes slightly faster. However, hypot() does not overflow for arguments near REALMAX. For example, in Python:

from math import sqrt, hypot

a=1e154; hypot(a,a); sqrt(a**2+a**2);

1.414213562373095e+154
inf

Execute the Hypot speed test by:

./RunHypot.py

Python 3.6 hypot() vs rsq()

Python 2.7 hypot() vs rsq()

Python 3.5 hypot() vs rsq()

Notes

Julia

Julia binaries are often downloaded to a particular directory. Python doesn't pickup .bash_aliases, which is commonly used to point to Julia.

Compiler selection

Intel Fortran:

FC=ifort cmake ..

GNU Fortran (gfortran ≥ 6 required):

FC=gfortran cmake ..

MKL selection

https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

We give a hint to CMake where your MKL libraries on. For example:

MKLROOT=/opt/intel/mkl cmake ..

Of course this option can be combined with FC.

You can set this environment variable permanently for your convenience (normally you always want to use MKL) by adding to your ~/.bashrc the line:

export MKLROOT=/opt/intel/mkl
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].