Hacker News new | past | comments | ask | show | jobs | submit login

How involved is your user model and what type of machine do you have?

I'm on an 8 year old i5 3.2ghz CPU based workstation running in WSL 2 with Docker.

With Rails 7.0.4 and Ruby 3.2.1 (YJIT not enabled):

1M empty hashes:

    Benchmark.measure{1000000.times{Hash.new}}
    @total=0.192643
But in 0.192 seconds I'm able to make 12,500 user models:

    Benchmark.measure{12500.times{User.new}}
    @total=0.19225799999999982
That is over 6,000 more than your ratio but based on your first number something tells me you have a much faster dev box than me.



11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz, WSL 2.

A better benchmark https://www.techempower.com/benchmarks/#section=data-r21&tes...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: