Coder Social home page Coder Social logo

paulsmithkc / raytracer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edin/raytracer

0.0 1.0 0.0 9.32 MB

Performance comparison of various compilers

PHP 5.15% Java 6.16% Batchfile 0.39% Python 3.36% Pascal 6.10% C++ 4.93% C# 5.89% Ruby 3.70% D 4.95% Go 4.25% C 5.72% Fortran 6.55% Nim 4.15% Rust 4.71% Swift 9.18% TypeScript 5.19% Zig 5.71% Visual Basic .NET 5.74% F# 4.44% Julia 3.73%

raytracer's Introduction

About

Raytracer benchmarks based on Typescript sample.

Results

Language / Compiler Time [ms]
Nim 130 ms
C++ (GCC) 160 ms
Fortran 160 ms
C (GCC) 160 ms
D (LDC) 210 ms
C (MSVC) 250 ms
C++ (MSVC) 250 ms
VB.NET 360 ms
C# 360 ms
Delphi XE6 390 ms
Odin 450 ms
Go 460 ms
Odin 500 ms
D (DMD) 500 ms
Java 8-14 600 ms
Delphi 2010 (32 bit) 720 ms
Julia 900 ms
F# 1800 ms
Node 1800 ms
HHVM 11000 ms
PHP (PHP 7.4) 24500 ms
PHP (PHP 7.3) 23500 ms
PHP (PHP 7.0) 25500 ms
Ruby 2.6 37600 ms
Ruby 2.2 47800 ms
Python 3.7 61000 ms
Python 3.5 68000 ms
PHP (PHP 5.6) 83000 ms
Zig ? ms
V ? ms
Swift ? ms
Haskel ? ms

Lines of code

Language Loc
Python 275
F# 300
Ruby 351
Julia 360
Nim 379
Typescript 412
C# 426
Swift 450
C++ 461
VB.NET 481
D 490
PHP 491
Go 529
C 560
Fortran 565
Java 569
Delphi 678

Comments:

C - Simple, clean and fast

C++ - Unlike C, C++ version does bounds checking, otherwise performaces are mostly the same

Nim - Uses Quake square root algorithm

Delphi2010 - Uses old 32 bit compiler

Node/V8 - It's blazing fast keeping in mind that it has to make sense out of javascript

PHP7 - For interpreted language (without JIT) this is close to what is possible to get

Fortran - Finally completed fortran port, it was much easier then expected

Tested On

All tests are done on AMD FX-8120 cpu.

raytracer's People

Contributors

edin avatar gabriellasso avatar shirleyquirk avatar

Watchers

 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.