Git Product home page Git Product logo

smallpt's Introduction

License

smallpt

About

The Rosetta smallpt project: the same path tracer (modifications of Kevin Baeson's 99 line C++ path tracer) written in multiple languages.

Note: I deliberately chose for the same software design for all programming languages out of clarity and performance reasons (this can conflict with the nature of declarative/functional programming languages).

Features

Current languages:

Performance comparison

In order to give a very rough performance comparison, the wall clock time is measured of a single run to generate an image of resolution 1024x768 using 64spp. All single process - single threads experiments output the current progression to standard output. All multi process - multi threaded experiments do not output the current progression to standard output (this can change in the future).

System:

  • OS: Windows 8.1 Pro 64 Bit
  • CPU: Intel i7-4770K @ 3,50 GHz (TB @ 3,9 GHz) with 8GB DDR3 @ 1600 MHz
  • GPU: NVIDIA GeForce GTX 970 with 4 GB GDDR5

Note: the random number generators used, differ between the languages and their implementations. It makes no sense to use the same random number generator in all implementations (i.e. C++ vs CUDA) and would introduce a huge burden to explicitly pass the state in languages such as Prolog.

Single process - Single threaded

Programming Language Compiler/Interpreter Wall clock (64 spp)
C MSVC++ 15.5.9 00h 01m 51.88s
C++ MSVC++ 15.5.9 00h 01m 21.32s
C# CLR 4.6.1055.0 00h 01m 30.56s
CoffeeScript CC 1.11.1/Chrome 00h 04m 19.63s
Erlang ERTS/BEAM 8.0 00h 59m 45.30s
Haskell GHC 8.0.1 00h 10m 35.55s
Haskell GHCi 8.0.1 02h 14m 54.00s
Java JVM 1.8 00h 01m 47.89s
JavaScript Chrome 00h 06m 27.63s
J# CLR 14.00 00h 06m 14.62s
Prolog SWI-Prolog 7.2.3 /
Python 2.7 CPython (Anaconda 4.1.12) 08h 24m 40.88s
Python 2.7 CPython (Canopy 1.5.2) 08h 35m 03.19s
Python 2.7 IronPython 2.7.6 06h 32m 11.48s
Python 2.7 PyPy 5.6.0 00h 20m 47.33s
Python 3.5 CPython (Anaconda 4.1.12) 09h 37m 05.13s
Python 2.7 + NumPy CPython (Anaconda 4.1.12) 09h 58m 25.18s
Python 2.7 + NumPy CPython (Canopy 1.5.2) 10h 43m 04.10s
Python 3.5 + NumPy CPython (Anaconda 4.1.12) 10h 20m 46.47s
Racket DrRacket 6.6 00h 49m 39.43s
TypeScript TSC 2.0.10/Chrome 00h 08m 10.58s

Multi process - Multi threaded

Programming Language Compiler/Interpreter Wall clock (64 spp)
C + OpenMP MSVC++ 15.5.9 00h 00m 22.09s
C++ MSVC++ 15.5.9 00h 00m 16.71s
C++ + OpenMP MSVC++ 15.5.9 00h 00m 25.97s
C# CLR 4.6.1055.0 00h 00m 24.16s
CUDA MSVC++ 15.5.9/NVCC 9.2 00h 00m 07.89s

Panorma (old version)

smallpt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

smallpt's Issues

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.