タグ

Benchmarkに関するYassLabのブックマーク (4)

  • Ruby might be faster than you think - John Hawthorn

    I saw a project a couple weeks back which allows writing and running Crystal methods inline inside a Ruby file. It’s a neat project, and I don’t want to take away from it but something in the README example looked off to me. require 'crystalruby' require 'benchmark' module Fibonnaci crystalize [n: :int32] => :int32 def fib_cr(n) a = 0 b = 1 n.times { a, b = b, a + b } a end module_function def fib

    YassLab
    YassLab 2024/05/04
    “Now it’s Ruby that’s 5 times faster than Crystal!!! And 20x faster than our original version. Though most likely that’s some cost from the FFI, or something similar, though that does seem like a surprising amount of overhead. ”
  • Is my host fast yet?

    Real-world server response (Time to First Byte) latencies, as experienced by real-world users navigating the web. Leaderboard: March 2024 Sort by Host Client Websites Fast (p75 < 800ms) Average Slow (p75 >= 1800ms) See a missing hosting provider? Please help us identify how to surface them here. How do you measure real-world Time to First Byte? This report is powered by Chrome User Experience Repo

    YassLab
    YassLab 2024/05/02
    “Real-world server response (Time to First Byte) latencies, as experienced by real-world users navigating the web. ”
  • https://twitter.com/tobi/status/1785651701858394334

    YassLab
    YassLab 2024/05/02
    “Good, but we can do better.”
  • Goで作ったシステムをRubyでリプレイスすることを検討してみた

    はじめに 弊社にはGoで作ったシステムが存在しますが、作られてから数年が経過して、メンテナンスも十分にできていない状況でした。 そこで、このシステムをリファクタリングして生産性を上げようという結論になりました。 リファクタリングにあたり、Goのままで行くのか、弊社でよく使われているRubyで行くのかを検討してみましたので、その過程を紹介したいと思います。 Rubyでリプレイスしようと思った理由 Goで動いてて言語やライブラリのバージョンアップなどメンテナンスがされてない部分はありますが、 そこを解消すればGoのままで行った方が良いのでは?と思うかもしれません。 しかし、あえてRubyでリプレイスしようと思うに至ったのは以下の点があります。 Rubyの方が開発速度があがりそう Goのリファクタリングをするのに時間がかかりそう Goのリファクタリングと機能追加でコード修正箇所が被るとスケジュー

    Goで作ったシステムをRubyでリプレイスすることを検討してみた
    YassLab
    YassLab 2024/05/01
    "実装に掛かった時間は1日程度 / Goのコード量は1,000行を超える / Rubyでは300行ほど / やはりAPIとDBの処理時間が全体の大半を占めている / 処理時間に大きな差が発生してない / CPUリソースは多く使いそうなのでその点は考慮”
  • 1