Steve21 Posted June 30, 2012 Posted June 30, 2012 You're running it directly, not outputting it? Will only show end result I'd assume? Steve
RabbieBurns Posted June 30, 2012 Author Posted June 30, 2012 but it takes <20 sec to display the 50000000 it cant possibly iterate them all in that time root@ubuntu:~# time ./test.py 0500000000 real 0m13.115s user 0m12.870s sys 0m0.020s also >> to a file oinly shows the 1 line
Arthur Posted June 30, 2012 Posted June 30, 2012 python 1 powershell 0 On this occasion it looks like it's the opposite result.
RabbieBurns Posted June 30, 2012 Author Posted June 30, 2012 1.2GB text file compresses into a 13MB rar file.. wow.
CyberNerd Posted June 30, 2012 Posted June 30, 2012 On this occasion it looks like it's the opposite result. it worked fine for me, in 2min - see the post above did you do: python ./test > output ? I'm using python 2.6
Arthur Posted June 30, 2012 Posted June 30, 2012 (edited) Python didn't work for me. Same issue as Rabbie I think. Could be user error though. http://i.imgur.com/2D9Yx.png I'm using Python v2.7.3 on Windows 7 (both 64-bit). #!c:/python27/python.exe -u count = 400000000 while count <= 499999999: count = count + 1 print '0%s' % (count) Edited June 30, 2012 by Arthur
Steve21 Posted June 30, 2012 Posted June 30, 2012 Python didn't work for me. Same issue as Rabbie I think. Could be user error though. http://i.imgur.com/2D9Yx.png I'm using Python v2.7.3 on Windows 7 (both 64-bit). #!c:/python27/python.exe -u count = 400000000 while count <= 499999999: count = count + 1 print '0%s' % (count) THat's because your script is wrong. Tabs in python are same as brackets. So you've got the print line outside the brackets. Tab it across one and it should print it. e.g. count = 400000000 while count <= 499999999: count = count + 1 print '0%s' % (count) 0400000002 >>> ================================ RESTART ================================ >>> 0400000001 0400000002 0400000003 0400000004 0400000005 0400000006 0400000007 0400000008 0400000009 0400000010 0400000011 >>> etc Steve 2
Arthur Posted June 30, 2012 Posted June 30, 2012 That's because your script is wrong. Thanks Steve! It's working now. I blame CyberNerd for not using the proper CODE tags. 2
Steve21 Posted June 30, 2012 Posted June 30, 2012 Thanks Steve! It's working now. I blame CyberNerd for not using the proper CODE tags. Spent many a hour at uni trying to work out why my project wasn't working only to realise it's just pythons stupidty in things like the tabs Steve
Arthur Posted June 30, 2012 Posted June 30, 2012 it just didn't paste properly The tabs aren't displayed in your post.
CyberNerd Posted June 30, 2012 Posted June 30, 2012 (edited) The tabs aren't displayed in your post. It seems to show up ok if it wrap it in a tag. but not just pasting. strange. i fixed it now Edited June 30, 2012 by CyberNerd
mac_shinobi Posted June 30, 2012 Posted June 30, 2012 The tabs aren't displayed in your post. Who needs to use the source when you can use the tab - or does the tab only work at the bar ?
mattx Posted June 30, 2012 Posted June 30, 2012 (edited) 1.2GB text file compresses into a 13MB rar file.. wow. Would be interesting to see the size if it were a Max compressed .arj Reason being is that I'm scripting some massive folders using 7zip. Edited June 30, 2012 by mattx
Arthur Posted July 2, 2012 Posted July 2, 2012 (edited) 1.2GB text file compresses into a 13MB rar file.. wow. Would be interesting to see the size if it were a max compressed .arj Here you are @mattx... ------------------------------------------------------- Format Size (Bytes) Compression Time ------------------------------------------------------- PAQ8O (-7) 612,210 13:53:08 KGB (-a7 -m9) 755,500 03:57:54 ACE 2,032,579 00:00:45 7-Zip (LZMA*) 11,145,528 00:09:14 7-Zip (LZMA2*) 11,259,540 00:05:12 RAR 13,429,575 00:00:16 ARC 14,600,448 00:05:02 XZ 15,519,312 00:02:33 BZip2 91,689,039 00:04:49 GZip 123,841,059 00:08:08 Zip 123,841,185 00:08:03 7-Zip (PPMd) 161,275,089 00:01:39 LZH 200,546,065 00:04:33 ARJ (-jm) 220,298,941 00:00:46 PEA 235,515,251 00:01:28 NTFS 375,001,088 00:00:13 ------------------------------------------------------- Original: 1,200,000,000 00:03:56 ** ------------------------------------------------------- * Dictionary Size: 96MB / Word Size: 256 / Block Size: 4GB ** Creation time As you can see from the file sizes above, ARJ isn't that great (at least in this particularly case with Rabbie's text file). PAQ, KGB and ACE are the clear winners in terms of size, although 7-Zip is still pretty good epecially when using LZMA2 for the compression method since it can use every processor core in your PC to speed up compression (like WinRAR). ACE has the best file size to compression time ratio, although it could just be extremely good at quickly compressing sequential numbers. Edited July 2, 2012 by Arthur 1
vikpaw Posted July 2, 2012 Posted July 2, 2012 Now the Geekiness is over, what are you going to do with all those numbers?
mattx Posted July 2, 2012 Posted July 2, 2012 That's fantastic - the sort of thing I would love to do if I had the time !! Here you are @mattx... ------------------------------------------------------- Format Size (Bytes) Compression Time ------------------------------------------------------- PAQ8O (-7) 612,210 13:53:08 KGB (-a7 -m9) 755,500 03:57:54 ACE 2,032,579 00:00:45 7-Zip (LZMA*) 11,145,528 00:09:14 7-Zip (LZMA2*) 11,259,540 00:05:12 RAR 13,429,575 00:00:16 ARC 14,600,448 00:05:02 XZ 15,519,312 00:02:33 BZip2 91,689,039 00:04:49 GZip 123,841,059 00:08:08 Zip 123,841,185 00:08:03 7-Zip (PPMd) 161,275,089 00:01:39 LZH 200,546,065 00:04:33 ARJ (-jm) 220,298,941 00:00:46 PEA 235,515,251 00:01:28 NTFS 375,001,088 00:00:13 ------------------------------------------------------- Original: 1,200,000,000 00:03:56 ** ------------------------------------------------------- * Dictionary Size: 96MB / Word Size: 256 / Block Size: 4GB ** Creation time As you can see from the file sizes above, ARJ isn't that great (at least in this particularly case with Rabbie's text file). PAQ, KGB and ACE are the clear winners in terms of size, although 7-Zip is still pretty good epecially when using LZMA2 for the compression method since it can use every processor core in your PC to speed up compression (like WinRAR). ACE has the best file size to compression time ratio, although it could just be extremely good at quickly compressing sequential numbers.
mac_shinobi Posted July 2, 2012 Posted July 2, 2012 Only took me 3 minutes 56 seconds. * My PC has a Core i5-2500K @ 4.6GHz, 16GB RAM and a 256GB SSD. Which SSD do you have in your pc ?
CyberNerd Posted July 2, 2012 Posted July 2, 2012 Originally Posted by Arthur Only took me 3 minutes 56 seconds. * My PC has a Core i5-2500K @ 4.6GHz, 16GB RAM and a 256GB SSD. out of interest, how long did it take to run the python script on that beast? my work machine managed real 1m3.992s user 1m3.080s sys 0m0.880s on Intel® Core2 Quad CPU Q6600 @ 2.40GHz 1
SYNACK Posted July 2, 2012 Posted July 2, 2012 Now the Geekiness is over, what are you going to do with all those numbers? Eep, asking about the usage for a large number set is not the geeky bit
Arthur Posted July 2, 2012 Posted July 2, 2012 Which SSD do you have in your PC? Crucial M4. out of interest, how long did it take to run the python script on that beast? I'll run it again when I get home tonight. My old PC had a Q6600 so it will be interesting to see how it compares.
Arthur Posted July 2, 2012 Posted July 2, 2012 (edited) out of interest, how long did it take to run the python script on that beast? my work machine managed real 1m3.992s user 1m3.080s sys 0m0.880s on Intel Core 2 Quad CPU Q6600 @ 2.40GHz Here's mine... real 0m53.860s user 0m43.447s sys 0m0.312s I rebooted into Ubuntu to run your Python script since it was easier. Do you think my times above are what you would expect from a Core i5-2500K + SSD? Edited July 2, 2012 by Arthur
CyberNerd Posted July 3, 2012 Posted July 3, 2012 Here's mine... real 0m53.860s user 0m43.447s sys 0m0.312s I rebooted into Ubuntu to run your Python script since it was easier. Do you think my times above are what you would expect from a Core i5-2500K + SSD? Sounds reasonable, a lot faster than my quad core or dual core machines !
RabbieBurns Posted July 4, 2012 Author Posted July 4, 2012 phew, sent out texts to all those numbers. Hopefully at least someone will respond.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now