HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mame
optcarrot
Ruby2016–2021
mame / optcarrot

optcarrot

A NES emulator written in Ruby

9Distinct people
10Mentions
0Explicit recommenders
866GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A NES emulator written in Ruby

GitHub

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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM 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 year10 dated mentions

Observed mentions: 2016-04-08 00:08:50 UTC to 2021-01-01 19:15:05 UTC.

012342016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

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
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC211
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC413
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

10 sources
In terms of pure Ruby performance, there's a semi-official non-trivial benchmark called optcarrot. Ruby 2.4 is 14.3x faster than Ruby 1.8.7 here: https://github.com/mame/optcarrot/blob/master/doc/benchmark.... Rails performance relative to JVM+Scala+Play is tricky to measure but the closest thing to a decent benchmark I know of is this: https://www.techempower.com/benchmarks/#section=data-r16&hw=... My own experience at ChartMogul with building production services in Ruby, Go and Rust is that the overall throughput of REST API type services increases a disappointing amount. With JRuby you get to retain all the benefits of the Rails ecosystem. Most of the Go and Scala community is driven by much larger companies who do open source libraries but they don't really build frameworks to help developers build software quickly.
In Rails, still?
Sinatra + Sequel is already very competitive in web performance with Go + Gin[1]. It's the Rails convenience stuff which slows things down massively. MJIT could probably bring Rails in line with Sinatra though. Between Ruby 1.8 and 2.5, performance has improved around 13x in tight loops[2]. The Rails performance issue has been massively overblown since 1.9 was released. Ruby 1.8 was a tree walking interpreter, so the move to a bytecode VM in 1.9 was a huge leap in performance. Twitter bailed to the JVM before moving to 1.9. A lot of those 10-100x performance differences to the JVM are gone thanks to the bytecode VM and generational GC. Bytecode VMs all have the same fundamental problem of instruction dispatch overhead, they're basically executing different C functions depending on input. Doing _anything_ to reduce this improves performanc
Read the rest
e dramatically, even just spitting out the instruction source code into a giant C function, compiling it, and calling that in place of the original method. Another 10x improvement on tight loops should not be a problem. [1] https://www.techempower.com/benchmarks/#section=data-r15&hw=... [2] https://github.com/mame/optcarrot/blob/master/doc/benchmark....
In Ruby 2.6.0-preview2 released with JIT
On the other hand, I am confident it's written in a much nicer way than most NES emulators (look at cpu.rb/ppu.rb). The goal of optcarrot is explicitly not to be the "practical"or "the fastest NES emulator". From https://github.com/mame/optcarrot > NOTE: We do not aim to create a practical NES emulator. There have been already many great emulators available. We recommend you use another emulator if you just want to play a game. JRuby+Truffle's performance is not bad compared to other languages: https://github.com/smarr/are-we-fast-yet#current-status
In Running Optcarrot, a Ruby NES Emulator, at 150 Fps with the GUI

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.