Skip to main content

Timeline for Output a googol copies of a string

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Oct 31, 2016 at 13:23 comment added chocochaos Edit with a somewhat different but working solution :)
Oct 31, 2016 at 13:22 history edited chocochaos CC BY-SA 3.0
deleted 6 characters in body
Oct 31, 2016 at 13:16 history edited chocochaos CC BY-SA 3.0
added 7 characters in body
Oct 31, 2016 at 13:07 comment added chocochaos You are correct, it doesn't give the correct results when comparing strings. I will fix it in a minute.
Oct 31, 2016 at 12:48 comment added Crypto As far as I know ">=" is not able to handle big integers, you should use bccomp
Oct 31, 2016 at 11:25 comment added chocochaos Uhm, it's not one a, it's a string of 4*10^9 as. There no way not go over the 4GB if you're going to put 3 times as many as in there. Ob_flush has nothing to do with it, the point of the second example is to output large strings at once instead of outputting small amounts of characters each time, which results in the program running quite a bit faster, at the cost of more memory usage.
Oct 31, 2016 at 10:45 comment added Martijn if just an 'a' takes almost 4GB, what would 'aaa' do? It will take more code, but with ob_flush(); you might go a lot further
Oct 30, 2016 at 13:42 history edited chocochaos CC BY-SA 3.0
edited body
Oct 30, 2016 at 12:54 history edited chocochaos CC BY-SA 3.0
deleted 1 character in body
Oct 30, 2016 at 12:46 history edited chocochaos CC BY-SA 3.0
deleted 2 characters in body
Oct 30, 2016 at 12:41 history answered chocochaos CC BY-SA 3.0