SplFileObject is faster than fopen/fgets

I had some memory issues recently when reading a file line-by-line with PHP. So I found that SplFileObject is faster and uses less memory than fopen followed by a loop with fgets. Here is a simple before & after code: Before $handle = fopen($path, ‘r’); if ($handle) { while (($buffer = fgets($handle, 1024)) !== false) […]

Java Tip : Collections Performance

The kind of collection used in the course of development of a Java application can increase or decrease the performance. Pay attention to these small details can make considerable difference according to the volume of data.