GithubHelp home page GithubHelp logo

mohsenti / compare-programming-languages Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 7 KB

Makefile 16.76% C 10.83% Go 9.02% Java 10.74% JavaScript 16.08% Pascal 8.10% PHP 10.15% Python 7.18% Shell 1.74% Fortran 9.41%

compare-programming-languages's Introduction

Compare Programming Languages

##1. What are these codes doing ? Codes are find all prime numbers betwean 2 .. 1999.
And all of them writen with defaults of interpereters/compilers.

##2. Tested languages

  • go
  • php
  • javascript (nodejs)
  • python (python 3)
  • freepascal (FPC)
  • C (gcc)
  • Fortran (gfortran)
  • java (openjdk)

##3. Building just run make

##4. Geting execution time of codes there is two way to getting time of execution time of codes.

  • One by one : using make languages command like make pascal

    • result will be like below

      Pascal
      real  0m0.131s
      user  0m0.093s
      sys 0m0.000s
  • Get all in one step : make times

    for result of this command check Some Result part

##5. Some Result

my pc configure

  • cpu: core i7
  • ram: 8GB

Result

$ make times

C
real    0m0.041s
user    0m0.003s
sys 0m0.007s

Pascal
real    0m0.153s
user    0m0.117s
sys 0m0.003s

Fortran
real    0m0.043s
user    0m0.010s
sys 0m0.000s

Java
real    0m1.580s
user    0m1.413s
sys 0m0.210s

Go
real    0m5.827s
user    0m4.190s
sys 0m0.427s

Node JS
real    0m2.945s
user    0m2.050s
sys 0m0.187s

Python
real    0m2.335s
user    0m2.190s
sys 0m0.063s

PHP
real    0m0.989s
user    0m0.467s
sys 0m0.080s

##6. Winner Based on result in my pc C is winner.

##7. Contributing New languages and optimizing is highly appreciated.

##8. Thanks to

  • Awkward (pascal code optimizer)
  • mischi (fortran code writer)

compare-programming-languages's People

Watchers

James Cloos avatar Mohsen avatar

Forkers

norayr

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.