high-performance-lang-comparison

command module
v0.0.0-...-28bbd3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 6 Imported by: 0

README

high-performance-lang-comparison

Compare performance between Python(numpy), R, Go, Rust, Julia

This checks the performance of each language by multiplying two randomized float values between 0 and 1 10,000,000 times by default.

You can change the number of times of calculation.

Maximum number is 2147483647(Limits on Integer Constants). It shall be like it since working with large arrays can be very memory-intensive and may require a lot of processing power, so the calculation may take a long time to complete.

How to test

python compare.py

Performance comparison

In my case

Input number(10,000,000 by default): 
R: 0.928009 seconds
Go: 0.2529853 seconds
Python: 0.14574241638183594 seconds
REM updating/compiling/finished/running output for Rust
Rust: 0.0926837 seconds
Julia: 0.064706 seconds
Press Any Key...

How about you?

Note

For Rust

Rust will make a bunch of files while running the test. Feel free to remove it after you've done the test.

You can remove

target
Cargo.lock

Cargo.toml is Rust version of package.json. If you want to run Rust script, you should not delete it.

This is working for only Windows currently, because commands are running through Windows batch file.

See Also

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL