PHP Performance : Copy vs. Reference

后端 未结 6 1446
南旧
南旧 2021-01-18 02:26

Hey there. Today I wrote a small benchmark script to compare performance of copying variables vs. creating references to them. I was expecting, that creating references to l

6条回答
  •  无人共我
    2021-01-18 02:53

    recursiveReference is calling recursiveCopy. Not that that would necessarily harm performance, but that's probably not what you're trying to do.

    Not sure why performance is slower, but it doesn't reflect the measurement you're trying to make.

提交回复
热议问题