HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
niofis
raybench
Rust2019–2019
niofis / raybench

raybench

Discover this repository through its Hacker News conversations.

5Distinct people
5Mentions
0Explicit recommenders
95GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:56:20 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 6-hour interval5 dated mentions

Observed mentions: 2019-04-25 17:34:21 UTC to 2019-04-30 08:43:30 UTC.

0122019-04-25 12:00:00 UTC to 2019-04-25 18:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsApr 25, 12:002019-04-25 18:00:00 UTC to 2019-04-26 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-04-26 00:00:00 UTC to 2019-04-26 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-26 06:00:00 UTC to 2019-04-26 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-26 12:00:00 UTC to 2019-04-26 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-26 18:00:00 UTC to 2019-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-27 00:00:00 UTC to 2019-04-27 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-27 06:00:00 UTC to 2019-04-27 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-27 12:00:00 UTC to 2019-04-27 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-27 18:00:00 UTC to 2019-04-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 27, 18:002019-04-28 00:00:00 UTC to 2019-04-28 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-28 06:00:00 UTC to 2019-04-28 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-28 12:00:00 UTC to 2019-04-28 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-28 18:00:00 UTC to 2019-04-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-29 00:00:00 UTC to 2019-04-29 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-29 06:00:00 UTC to 2019-04-29 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-29 12:00:00 UTC to 2019-04-29 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-04-29 18:00:00 UTC to 2019-04-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-30 00:00:00 UTC to 2019-04-30 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-30 06:00:00 UTC to 2019-04-30 12:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 30, 06:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 25, 12:002019-04-25 12:00:00 UTC2019-04-25 18:00:00 UTC110
Apr 25, 18:002019-04-25 18:00:00 UTC2019-04-26 00:00:00 UTC202
Apr 26, 00:002019-04-26 00:00:00 UTC2019-04-26 06:00:00 UTC000
Apr 26, 06:002019-04-26 06:00:00 UTC2019-04-26 12:00:00 UTC000
Apr 26, 12:002019-04-26 12:00:00 UTC2019-04-26 18:00:00 UTC000
Apr 26, 18:002019-04-26 18:00:00 UTC2019-04-27 00:00:00 UTC000
Apr 27, 00:002019-04-27 00:00:00 UTC2019-04-27 06:00:00 UTC000
Apr 27, 06:002019-04-27 06:00:00 UTC2019-04-27 12:00:00 UTC000
Apr 27, 12:002019-04-27 12:00:00 UTC2019-04-27 18:00:00 UTC000
Apr 27, 18:002019-04-27 18:00:00 UTC2019-04-28 00:00:00 UTC000
Apr 28, 00:002019-04-28 00:00:00 UTC2019-04-28 06:00:00 UTC000
Apr 28, 06:002019-04-28 06:00:00 UTC2019-04-28 12:00:00 UTC000
Apr 28, 12:002019-04-28 12:00:00 UTC2019-04-28 18:00:00 UTC000
Apr 28, 18:002019-04-28 18:00:00 UTC2019-04-29 00:00:00 UTC000
Apr 29, 00:002019-04-29 00:00:00 UTC2019-04-29 06:00:00 UTC000
Apr 29, 06:002019-04-29 06:00:00 UTC2019-04-29 12:00:00 UTC000
Apr 29, 12:002019-04-29 12:00:00 UTC2019-04-29 18:00:00 UTC101
Apr 29, 18:002019-04-29 18:00:00 UTC2019-04-30 00:00:00 UTC000
Apr 30, 00:002019-04-30 00:00:00 UTC2019-04-30 06:00:00 UTC000
Apr 30, 06:002019-04-30 06:00:00 UTC2019-04-30 12:00:00 UTC101

What Hacker News says

1 sources
The startup costs are fixed (they don't increase linearly with the number of loop iterations) and for such a small program, they could not reasonbly explain more than 1s of the 20s gap between C and Java. Also, I don't think it's "allocating objects in an inner loop", because Java's allocations are super cheap (bump allocations) if the escape analyzer doesn't keep them on the stack in the first place. That said, after examining this benchmark further, I don't think it's very good since the sequences returned by the random number generators are not controlled for (each implementation uses its own standard library RNG with their own seeds, so the sequences will vary from language to language). This likely causes more loop iterations, but considering the loop termination condition, the theoretical distribution of RNG outputs, and the trivial
Read the rest
work done in the loop body, I doubt that the delta in loop iterations can explain any significant portion of the gap. Rather, I think the gap is simply a difference in performance of the RNGs themselves--C and Rust use a poor man's RNG (xorshift) which performs very well for this exercise but is not a good general purpose RNG (and standard library RNGs are optimized for the general case). When I rewrote the Go version, using the xorshift implementation made the most significant impact (15s), although I'm not 100% sure that the output of the RNG isn't just causing it to run the RNG less frequently. I opened up this ticket against the project: https://github.com/niofis/raybench/issues/15.
In Programming language ray tracing benchmarks project

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.