C#クラスのプロパティ/メンバーが10個の場合、1000000回Get/Setを行って、実行時間を測定しました。
予想通りdynamicが一番遅いですが、x64版ExpandoObjectのSetが異常に遅い
X86
DynamicObject Get:00:00:02.2153136
DynamicObject Set:00:00:01.7981042
ExpandoObject Get:00:00:01.4820760
ExpandoObject Set:00:00:01.6224832
Class Member Get:00:00:00.0156008
Class Member Set:00:00:00.0312016
Class Property Get:00:00:00.0468024
Class Property Set:00:00:00.0624032
X64
DynamicObject Get:00:00:01.5600300
DynamicObject Set:00:00:01.6848324
ExpandoObject Get:00:00:00.7644147
ExpandoObject Set:00:00:08.7049674
Class Member Get:00:00:00.0156003
Class Member Set:00:00:00.0312006
Class Property Get:00:00:00.0468009
Class Property Set:00:00:00.0780015
0 件のコメント:
コメントを投稿