Created
July 17, 2012 16:56
-
-
Save x7c1/3130580 to your computer and use it in GitHub Desktop.
Memory use of a Range class in Plater Library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| use x7c1\plater\collection\immutable\Range; | |
| class SampleRangeTest extends \PHPUnit_Framework_TestCase{ | |
| public function test_memory(){ | |
| foreach(new range(1, 700000) as $i){ | |
| //Memory: 2.50Mb | |
| } | |
| } | |
| } | |
| // see also | |
| // https://github.com/x7c1/Plater/blob/master/src/main/collection/immutable/Range.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| class SampleRangeTest extends \PHPUnit_Framework_TestCase{ | |
| public function test_memory(){ | |
| foreach(range(1, 700000) as $i){ | |
| //Memory: 101.50Mb | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment