Just ran this test on my machine, interestingly casting (object) array is much quicker than creating stdClass:

5.3.1
new stdClass(): 5.9607532024384
(object) array(): 3.4466769695282

5.4.3
new stdClass(): 3.2519390583038
(object) array(): 2.7573947906494