もはや空気のようになったLINQですが、いまだに活用されていない現場を見ることもあり、非常に残念に思います。 そこで、本エントリではいわゆる「キーブレイク処理」をLINQで置き換え、性能にほとんど差がないことを示し、LINQ導入の一助としたいと思います。 テーマ 取引先と商品ごとに単価と数量を持つ売上データを、明細、小計(商品ごと)、大計(取引先ごと)、総計を出すプログラムを考えます。 元データはこんな感じで生成します。 This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode ch
![LINQ vs キーブレイク パフォーマンス勝負 #dotnetjp #adcjcs by @masaru_b_cl](https://cdn-ak-scissors.b.st-hatena.com/image/square/90a1ee5a4b908fc1849f691e130e5f151b0b9782/height=288;version=1;width=512/https%3A%2F%2Ftakanosho.files.wordpress.com%2F2013%2F12%2Fimage_thumb6.png)