Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jashmatthews
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
jashmatthews
5y ago
Even more wild is the JavaScriptCore bytecode VM which is written in a Ruby DSL which is either compiled to C or directly to ASM. I'm jealous we don't have something like this for CRuby!
62.
▲
by
jashmatthews
6y ago
https://blog.pragmaticengineer.com/software-engineering-sala...
63.
▲
by
jashmatthews
6y ago
Startups with no money yes but places like Zalando pay ~100k total comp. People working for places like Microsoft or GitHub more like ~150k. https://www.levels.fyi/Salaries/Software-Engineer/Berlin-Ger...
64.
▲
by
jashmatthews
6y ago
NZ had swine flu just 10 days after the USA. Covid19 reached New Zealand before Berlin. Even back in 1918 the flu pandemic reached NZ in months at a time when that journey by ship wasn't much faster!
65.
▲
by
jashmatthews
6y ago
NZ has extremely high international air traffic. With 11M international passengers per year Auckland airport is comparable with the big US airports like SFO with 13.8M international. Even kiwis often don’t realize just how busy Auckland air
66.
▲
by
jashmatthews
6y ago
LuaJIT 1.x uses DynASM for JIT but LuaJIT 2.x doesn't and instead uses the IR to ASM compiler in https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_asm.c A program using DynASM doesn't depe
67.
▲
Ruby Garbage Collection Deep Dive: Generational Garbage Collection
(jemma.dev)
1 points
by
jashmatthews
6y ago
|
0 comments
68.
▲
by
jashmatthews
6y ago
Ability to handle vastly more power than from the factory with bolt-on upgrades.
69.
▲
by
jashmatthews
6y ago
The 2JZs cost Porsche money new. Here in New Zealand Japanese imports could be had for a massive discount but they were never an affordable car.
70.
▲
by
jashmatthews
6y ago
You can happily use pthreads for concurrency up to ~10k before reaching for async.
71.
▲
by
jashmatthews
6y ago
Rocket's low performance could well be because the threadpool and DB connection pool is undersized: https://github.com/TechEmpower/FrameworkBenchmarks/blob/b891...
72.
▲
by
jashmatthews
6y ago
OMR is a super impressive project! I spent quite a lot of time looking into Matthew Guadet and the rest of the team’s work before starting work on a tracing compiler for CRuby.
73.
▲
by
jashmatthews
6y ago
> You'll need to need to write most of the C function calls back into Ruby and have the JIT properly inline them to get equivalent performance. What works really well for TruffleRuby etc might not work that well for a simpler optimi
74.
▲
by
jashmatthews
6y ago
Puma is part of the default Rails Gems and was first released all the way back in 2011.
75.
▲
by
jashmatthews
6y ago
Doing nothing 10x as fast is not all that useful. In a real app it's unlikely the difference in context switching being 0.2% of your CPU time or 0.02% of your CPU time matters. It's also not a fundamental restriction on threads vs
76.
▲
by
jashmatthews
6y ago
Process per core with threading for parallel IO has been the default for almost a decade now.
77.
▲
by
jashmatthews
6y ago
Ruby had support for in-process concurrency via threads for the last 14 years.
78.
▲
by
jashmatthews
6y ago
> Threads are lighter weight than processes they're still relatively expensive to switch between and to maintain in memory ... context switching between processes is pretty expensive This is a really common misconception. Both swit
79.
▲
by
jashmatthews
6y ago
The runtime also controls the alignment of allocations.
80.
▲
V8 Sparkplug Baseline JIT
(docs.google.com)
2 points
by
jashmatthews
6y ago
|
0 comments
81.
▲
by
jashmatthews
6y ago
While MIR could be an interesting alternative to CraneLift it doesn't really address the challenges faced by trying to improve performance via JIT compilation within CRuby.
82.
▲
by
jashmatthews
6y ago
Context-threading is a JIT technique. CRuby can optionally use call-threading where each op is a function and dispatch is an infinite loop of function calls. It's not the default since direct or token threading are faster but it's
83.
▲
by
jashmatthews
6y ago
TruffleRuby already has that kind of performance increase on microbenchmarks. The CRuby JIT for 3x3 built by one person in their spare time.
84.
▲
by
jashmatthews
6y ago
First class option in Ruby 2.6 onwards.
85.
▲
by
jashmatthews
6y ago
If you're talking about just compilation then it's easy enough doing something like context-threading where you translate bytecode into a call instruction per operation to a function implementing the bytecode. If you're talki
86.
▲
by
jashmatthews
6y ago
CRuby has had JIT for over 3 years now and I think JRuby must be over a decade?
87.
▲
by
jashmatthews
6y ago
Right but that's how VM's like CRuby do it. Dispatch looks like: goto *(void const *) *virtual_pc_in_register; That gets translated to an indirect jump. There's no lookup in a dispatch table but that's still an in
88.
▲
by
jashmatthews
6y ago
I don't understand what you mean by either of these techniques. 1) If you have a basic block of bytecodes, how does a linked list help? You still have an indirect jump to actually execute the instructions for the bytecode op. Or do you
89.
▲
JIT Compiler in PHP8
(www2.slideshare.net)
1 points
by
jashmatthews
6y ago
|
0 comments
90.
▲
by
jashmatthews
6y ago
> each is in its own OS thread and GVL releases when the thread blocks. The GVL isn't automatically released when a thread blocks on IO. Each bit of native code performing IO has to explicitly release it like in the pg gem here: ht
More ›