error_log与fwrite性能对比

error_log与fwrite写入性能对比

环境
CPU1: AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ stepping 02
4G 内存

10w条数据

从mysql读取数据
平均用时 : 0.20063090324402

error_log 完成数据写入耗时:3.0148850440979

fwrite 完成数据写入耗时:0.41811609268188

如果是大量的数据需要写入,用fwrite的效率就会明显比error_log 高

谬论记录完毕

你可能感兴趣的:(error_log与fwrite性能对比)