Skip to content

Simple benchmarks of Dijkstra algorithm among C++, Go, Julia, Python, JavaScript, Rust and Kotlin

Notifications You must be signed in to change notification settings

mitsutaka-takeda/langs-bench-dijkstra

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

langs-bench-dijkstra

Simple benchmarks of Dijkstra algorithm among C++, Go, Julia, Python, JavaScript, Rust and Kotlin.

Requirement

This benchmark uses hyperfine.

And runs on languages below:

  • Go : 1.14
  • Rust : 1.44
  • JavaScript : NodeJS 13
  • Kotlin : 1.3 + jdk >=8
  • Julia : 1.4
  • GCC : 7.5 (or versions which support C++11)

I like to use asdf to set up those environments.

while read lang plugin version dummy; do
  asdf plugin add $plugin
  asdf install $plugin $version
  (cd $lang; asdf local $plugin $version)
done <<EOT
go golang 1.14.2
python python 3.8.2
kotlin java adopt-openjdk-14.0.1+7
kotlin kotlin 1.3.72
rust rust 1.44.0
julia julia 1.4.1
javascript nodejs 13.13.0
EOT
asdf reshim

Also you need to get the Tokyo's road network data from Urban Road Network Data .

mkdir data
curl -L https://ndownloader.figshare.com/files/3663336 > data/tokyo.zip
pushd data
unzip tokyo.zip
popd

How to run

for all languages

./run.sh

for specific language

./run.sh [cpp|go|rust|javascript|julia|kotlin]

About

Simple benchmarks of Dijkstra algorithm among C++, Go, Julia, Python, JavaScript, Rust and Kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.6%
  • Rust 3.9%
  • Julia 3.7%
  • Go 3.2%
  • Kotlin 3.2%
  • JavaScript 3.0%
  • Other 3.4%