Tuesday, March 02
Fractal Wrongness In A Programming Language
I have 800 arrays of about 5000 integers each that I need to combine into an array of about 4 million integers. I don't care about the order or anything, I just want one big array.
PHP had used 8 minutes of CPU time and 1.2GB of RAM when I shot it through the head.
Solution: Don't use PHP.
Comments are disabled.
Post is locked.
I have 800 arrays of about 5000 integers each that I need to combine into an array of about 4 million integers. I don't care about the order or anything, I just want one big array.
PHP had used 8 minutes of CPU time and 1.2GB of RAM when I shot it through the head.
Solution: Don't use PHP.
Posted by: Pixy Misa at
04:15 PM
| Comments (6)
| Add Comment
| Trackbacks (Suck)
Post contains 65 words, total size 1 kb.
1
That's a lot of RAM. I wonder what it was doing with all of it.
Posted by: Steven Den Beste at Wednesday, March 03 2010 04:07 AM (+rSRq)
2
What format are the arrays in? 800 flat files on disk?
Posted by: K.S. Bhaskar at Wednesday, March 03 2010 12:55 PM (eyb9K)
3
They were PHP arrays. Already in memory.
Posted by: Pixy Misa at Wednesday, March 03 2010 01:43 PM (PiXy!)
4
Flat files on disk turned out to be an enormous improvement, by the way.
Posted by: Pixy Misa at Wednesday, March 03 2010 01:44 PM (PiXy!)
5
I did not expect Minx to use PHP in the first place. I thought you just coded it all in Python driven off some modern equivalent of CGI.
Posted by: Pete Zaitcev at Wednesday, March 03 2010 03:42 PM (/ppBw)
6
Yep, Minx is all in Python, based on CherryPy. This was at my day job, where we are transitioning to Python but some stuff is still in PHP.
Posted by: Pixy Misa at Wednesday, March 03 2010 08:15 PM (PiXy!)
46kb generated in CPU 0.0151, elapsed 0.1162 seconds.
56 queries taking 0.1067 seconds, 344 records returned.
Powered by Minx 1.1.6c-pink.
56 queries taking 0.1067 seconds, 344 records returned.
Powered by Minx 1.1.6c-pink.