Git Product home page Git Product logo

creating_primes's Introduction

There are 2 scripts here that are identical in function: finding prime numbers in a specified range.

creating_primes.R creating_primes.py

I wanted to see the difference in performance between the two. While I wasn't surprised to see Python performing better than R, I was, however, suprised to see by how much.

Here are the results of running both scripts in different contexts over the range 2 to 100,000:

RStudio: 8:16.50
R Shell: 8:09.69
SparkR Shell: 8:25.80
Python Shell: 1:11.89
pySpark: 1:12.67

I should comment that the Spark "cluster" is just a local instance on my laptop. I believe that to get the best performance out of Spark you have to utilize it's dataframes and distribute across a cluster, niether of which I am doing here for this test.

In any case - I was curious and this is what I found out - now I am sharing with you!

Jake

creating_primes's People

Contributors

jrozra200 avatar

Watchers

James Cloos avatar  avatar Wiki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.