HackerPapers

arXiv:2001.02491cs.MS

Comparing Python, Go, and C++ on the N-Queens Problem

Pascal Fua, Krzysztof Lis

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

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.

arXiv comments
Journal reference
DOI
Subjects
cs.MSMathematical Software

On Hacker News

No comments linking this paper were found in the collected sources. Found in 1 HN submission from Jan 2020 to Jan 2020. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.