Intro biomeにはforEachを使用すると、for...ofを使用するようにエラーが出ます。これはnoForEachというrecommendedルールによるものです。 今回はなぜfor...ofを使うように推奨しているのかを、処理速度の観点で見ていきます。 Performance ドキュメントには以下のように記載されています。 Performance: Using forEach can lead to performance issues, especially when working with large arrays. When more requirements are added on, forEach typically gets chained with other methods like filter or map, causing multiple iter
![BiomeがforEachではなくfor...ofを推す理由を処理速度の観点から見る](https://cdn-ak-scissors.b.st-hatena.com/image/square/e30da6b40d0dd5fda09b91319760ac826f606dc9/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--kC-DxQ8x--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3ABiome%2525E3%252581%25258CforEach%2525E3%252581%2525A7%2525E3%252581%2525AF%2525E3%252581%2525AA%2525E3%252581%25258Ffor...of%2525E3%252582%252592%2525E6%25258E%2525A8%2525E3%252581%252599%2525E7%252590%252586%2525E7%252594%2525B1%2525E3%252582%252592%2525E5%252587%2525A6%2525E7%252590%252586%2525E9%252580%25259F%2525E5%2525BA%2525A6%2525E3%252581%2525AE%2525E8%2525A6%2525B3%2525E7%252582%2525B9%2525E3%252581%25258B%2525E3%252582%252589%2525E8%2525A6%25258B%2525E3%252582%25258B%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3A%2525E3%252583%2525A6%2525E3%252582%2525A6%2525E3%252583%252588%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL3plbm4tdXNlci11cGxvYWQvYXZhdGFyL2Q4NzFiYTNmNzguanBlZw%3D%3D%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)