{"id":13819295,"url":"https://github.com/matt77hias/smallpt","last_synced_at":"2026-01-21T19:17:22.106Z","repository":{"id":82672090,"uuid":"68945918","full_name":"matt77hias/smallpt","owner":"matt77hias","description":"☀️ The Rosetta smallpt (small path tracing) project","archived":false,"fork":false,"pushed_at":"2024-04-07T20:17:05.000Z","size":31170,"stargazers_count":103,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-16T04:36:27.371Z","etag":null,"topics":["path-tracing","pbr","ray-tracing","rendering"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matt77hias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-22T17:35:43.000Z","updated_at":"2025-05-09T03:23:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0e9780c-cbb3-4d49-b14c-e46133f01076","html_url":"https://github.com/matt77hias/smallpt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matt77hias/smallpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt77hias%2Fsmallpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt77hias%2Fsmallpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt77hias%2Fsmallpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt77hias%2Fsmallpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matt77hias","download_url":"https://codeload.github.com/matt77hias/smallpt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt77hias%2Fsmallpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28640792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["path-tracing","pbr","ray-tracing","rendering"],"created_at":"2024-08-04T08:00:44.443Z","updated_at":"2026-01-21T19:17:22.090Z","avatar_url":"https://github.com/matt77hias.png","language":null,"funding_links":[],"categories":["Others","miscellaneous"],"sub_categories":[],"readme":"[![License][s1]][li]\n\n[s1]: https://img.shields.io/badge/licence-GPL%203.0-blue.svg\n[li]: https://raw.githubusercontent.com/matt77hias/smallpt/master/LICENSE.txt\n\n# smallpt\n\n## About\nThe Rosetta smallpt project: the same path tracer (modifications of Kevin Baeson's [99 line C++ path tracer](http://www.kevinbeason.com/smallpt/)) written in multiple languages.\n\n**Note**: I deliberately chose for the same software design for [all programming languages](https://github.com/matt77hias/smallpt) out of clarity and performance reasons (this can conflict with the nature of declarative/functional programming languages).\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"res/image.png\" \u003e\u003c/p\u003e\n\n## Features\n**Current languages**:\n\n* [C](https://github.com/matt77hias/c-smallpt)\n  * single threaded\n  * multi threaded (OpenMP)\n* [C++](https://github.com/matt77hias/cpp-smallpt)\n  * single threaded\n  * multi threaded (Windows Threads)\n  * multi threaded (OpenMP)\n* [C#](https://github.com/matt77hias/cs-smallpt)\n  * single threaded\n  * multi threaded\n* [CoffeeScript](https://github.com/matt77hias/coffee-smallpt)\n* [CUDA](https://github.com/matt77hias/cu-smallpt)\n* [Erlang](https://github.com/matt77hias/erl-smallpt)\n* [GLSL](https://www.shadertoy.com/view/MlcczX)\n* [Haskell](https://github.com/matt77hias/hs-smallpt)\n* [Java](https://github.com/matt77hias/java-smallpt)\n* [JavaScript](https://github.com/matt77hias/js-smallpt)\n* [J#](https://github.com/matt77hias/jsl-smallpt)\n* [Prolog](https://github.com/matt77hias/pl-smallpt)\n* Python 2\n  * [Python](https://github.com/matt77hias/py-smallpt)\n  * [Python + NumPy](https://github.com/matt77hias/numpy-smallpt)\n* Python 3\n  * [Python](https://github.com/matt77hias/py-smallpt)\n  * [Python + NumPy](https://github.com/matt77hias/numpy-smallpt)\n  * [Python + Taichi](https://github.com/burhanuddin6/accelerated_small_pt/tree/rand_solved)\n* [Racket](https://github.com/matt77hias/rkt-smallpt)\n* [TypeScript](https://github.com/matt77hias/ts-smallpt)\n\n## Performance comparison\nIn 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).\n\n**System**:\n* OS: Windows 8.1 Pro 64 Bit\n* CPU: Intel i7-4770K @ 3,50 GHz (TB @ 3,9 GHz) with 8GB DDR3 @ 1600 MHz\n* GPU: NVIDIA GeForce GTX 970 with 4 GB GDDR5\n\n**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.\n\n### Single process - Single threaded\n\n| Programming Language                                                | Compiler/Interpreter         | Wall clock (64 spp) |\n|---------------------------------------------------------------------|------------------------------|---------------------|\n| [C](https://github.com/matt77hias/c-smallpt)                        | MSVC++ 15.5.9                | 00h 01m 51.88s      |\n| [C++](https://github.com/matt77hias/cpp-smallpt)                    | MSVC++ 15.5.9                | 00h 01m 21.32s      |\n| [C#](https://github.com/matt77hias/cs-smallpt)                      | CLR 4.6.1055.0               | 00h 01m 30.56s      |  \n| [CoffeeScript](https://github.com/matt77hias/coffee-smallpt)        | CC 1.11.1/Chrome             | 00h 04m 19.63s      |\n| [Erlang](https://github.com/matt77hias/erl-smallpt)                 | ERTS/BEAM 8.0                | 00h 59m 45.30s      |\n| [Haskell](https://github.com/matt77hias/hs-smallpt)                 | GHC 8.0.1                    | 00h 10m 35.55s      |\n| [Haskell](https://github.com/matt77hias/hs-smallpt)                 | GHCi 8.0.1                   | 02h 14m 54.00s      |\n| [Java](https://github.com/matt77hias/java-smallpt)                  | JVM 1.8                      | 00h 01m 47.89s      |\n| [JavaScript](https://github.com/matt77hias/js-smallpt)              | Chrome                       | 00h 06m 27.63s      |\n| [J#](https://github.com/matt77hias/jsl-smallpt)                     | CLR 14.00                    | 00h 06m 14.62s      |\n| [Prolog](https://github.com/matt77hias/pl-smallpt)                  | SWI-Prolog 7.2.3             | /                   |\n| [Python 2.7](https://github.com/matt77hias/py-smallpt)              | CPython (Anaconda 4.1.12)    | 08h 24m 40.88s      |\n| [Python 2.7](https://github.com/matt77hias/py-smallpt)              | CPython (Canopy 1.5.2)       | 08h 35m 03.19s      |\n| [Python 2.7](https://github.com/matt77hias/py-smallpt)              | IronPython 2.7.6             | 06h 32m 11.48s      |\n| [Python 2.7](https://github.com/matt77hias/py-smallpt)              | PyPy 5.6.0                   | 00h 20m 47.33s      |\n| [Python 3.5](https://github.com/matt77hias/py-smallpt)              | CPython (Anaconda 4.1.12)    | 09h 37m 05.13s      |\n| [Python 2.7 + NumPy](https://github.com/matt77hias/numpy-smallpt)   | CPython (Anaconda 4.1.12)    | 09h 58m 25.18s      |\n| [Python 2.7 + NumPy](https://github.com/matt77hias/numpy-smallpt)   | CPython (Canopy 1.5.2)       | 10h 43m 04.10s      |\n| [Python 3.5 + NumPy](https://github.com/matt77hias/numpy-smallpt)   | CPython (Anaconda 4.1.12)    | 10h 20m 46.47s      |\n| [Racket](https://github.com/matt77hias/rkt-smallpt)                 | DrRacket 6.6                 | 00h 49m 39.43s      |\n| [TypeScript](https://github.com/matt77hias/ts-smallpt)              | TSC 2.0.10/Chrome            | 00h 08m 10.58s      |\n\n### Multi process - Multi threaded\n\n| Programming Language                                                | Compiler/Interpreter         | Wall clock (64 spp) |\n|---------------------------------------------------------------------|------------------------------|---------------------|\n| [C + OpenMP](https://github.com/matt77hias/c-smallpt)               | MSVC++ 15.5.9                | 00h 00m 22.09s      |\n| [C++](https://github.com/matt77hias/cpp-smallpt)                    | MSVC++ 15.5.9                | 00h 00m 16.71s      |\n| [C++ + OpenMP](https://github.com/matt77hias/cpp-smallpt)           | MSVC++ 15.5.9                | 00h 00m 25.97s      |\n| [C#](https://github.com/matt77hias/cs-smallpt)                      | CLR 4.6.1055.0               | 00h 00m 24.16s      | \n| [CUDA](https://github.com/matt77hias/cu-smallpt)                    | MSVC++ 15.5.9/NVCC 9.2       | 00h 00m 07.89s      |\n\n### Panorma (old version)\n\u003cp align=\"center\"\u003e\u003cimg src=\"res/Comparison%20(low%20resolution).png\" \u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt77hias%2Fsmallpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatt77hias%2Fsmallpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt77hias%2Fsmallpt/lists"}