LoginSignup
37
37

More than 5 years have passed since last update.

メモ: Underscore vs Lo-Dash

Last updated at Posted at 2013-11-06

メモ。

  • Underscore.js http://underscorejs.org/
  • Lo-Dash http://lodash.com/
  • Lo-Dashの方が高速。
  • Underscoreの方がファイルサイズは小さい。
    • 別表参照
    • 3.5KB程度は誤差の範囲と言って良さそう(Underscore互換版の場合)
  • Lo-Dashの方が機能数が多い
    • 互換版は削ってる
    • 必要な機能だけ別途コピペで追加しても良いんじゃないかな
  • Lo-DashのUnderscore互換版を使うのが良さそうか
  • プロジェクトで未使用の機能をがんがん削ったらもっと軽くなりそう
    • そういう仕組みもあるみたい(手元の環境で動かなかった、今度改めてやる)
ファイル サイズ (Bytes) (*)
underscore-min.js (1.5.2) 14,358 +0
lodash.underscore.min.js (2.2.1) 17,867 +3,499
lodash.min.js (2.2.1) 26,896 +12,538

(*) … ファイル本体のサイズ。転送時はgzipでより小さくなる

37
37
7

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
37