Python currently is the dominant language in the field of Machine Learning
but is often criticized for being slow to perform certain tasks. In this
report, we use the well-known $N$-queens puzzle as a benchmark to show that
once compiled using the Numba compiler it becomes competitive with C++ and Go
in terms of execution speed while still allowing for very fast prototyping.
This is true of both sequential and parallel programs. In most cases that arise
in an academic environment, it therefore makes sense to develop in ordinary
Python, identify computational bottlenecks, and use Numba to remove them.
Description
Comparing Python, Go, and C on the N-Queens Problem
%0 Generic
%1 fua2020comparing
%A Fua, Pascal
%A Lis, Krzysztof
%D 2020
%K C++ go language python
%T Comparing Python, Go, and C++ on the N-Queens Problem
%U http://arxiv.org/abs/2001.02491
%X Python currently is the dominant language in the field of Machine Learning
but is often criticized for being slow to perform certain tasks. In this
report, we use the well-known $N$-queens puzzle as a benchmark to show that
once compiled using the Numba compiler it becomes competitive with C++ and Go
in terms of execution speed while still allowing for very fast prototyping.
This is true of both sequential and parallel programs. In most cases that arise
in an academic environment, it therefore makes sense to develop in ordinary
Python, identify computational bottlenecks, and use Numba to remove them.
@misc{fua2020comparing,
abstract = {Python currently is the dominant language in the field of Machine Learning
but is often criticized for being slow to perform certain tasks. In this
report, we use the well-known $N$-queens puzzle as a benchmark to show that
once compiled using the Numba compiler it becomes competitive with C++ and Go
in terms of execution speed while still allowing for very fast prototyping.
This is true of both sequential and parallel programs. In most cases that arise
in an academic environment, it therefore makes sense to develop in ordinary
Python, identify computational bottlenecks, and use Numba to remove them.},
added-at = {2020-01-30T13:19:32.000+0100},
author = {Fua, Pascal and Lis, Krzysztof},
biburl = {https://www.bibsonomy.org/bibtex/23f68f74baa5326df391b020a3ca8082e/rpennec},
description = {Comparing Python, Go, and C on the N-Queens Problem},
interhash = {8dac6dd5696fb97c730761fce3d080c2},
intrahash = {3f68f74baa5326df391b020a3ca8082e},
keywords = {C++ go language python},
note = {cite arxiv:2001.02491},
timestamp = {2020-03-04T15:55:52.000+0100},
title = {Comparing Python, Go, and C++ on the N-Queens Problem},
url = {http://arxiv.org/abs/2001.02491},
year = 2020
}