« first day (147 days earlier)      last day (753 days later) » 

10:03 PM
CMC: Write a program that compiles nearly instantly without optimisations, but will crash your computer under -O
 
@H.PWiz Did you find such a program yourself by accident?
 
Yes, some time ago. It just came back to mind today
 
@H.PWiz what does -O do?
 
@flawr O for optimise. you also have -O2 and -O3 (it's a compiler option)
 
didn't know this was a thing!
 
10:11 PM
Lol, it can actually make a very big difference in speed
 
I'm trying that right now :)
hm didn't see any improvement
 
I have before, usually on programs that take 30+ seconds.
@flawr Are you using -O3?
 
just tried -O and -O2
the documentation I read did not include -O3
oh it was probably too old
 
I have about a noticeable speed-up for a "dumb" recursive Fibonacci function
 
does it apply memoizing or similar things?
couldn't find out what actually is optimized
 
10:24 PM
No, it's still obnoxiously slow. I don't know the details of it
You can get the compiler to dump intermediate stuff if you can read "Core"
 
@WillNess I think you can change h<=b,h>=a to h<b,h>a by adjusting the values in the tuples.
 
thanks, will think about it.
OTOH, should we do this? The code should be easily edited to incorporate the given set of data...
so, just include it, more or less verbatim.
ditched explicit type thanks to !!, shaving off 5 more bytes!
(or thanks to length)
 
@WillNess Well its not worse than encoding everything like e.g. the Jelly answer does, but as you want.
 
hmm, you're right, there. but I've had my fill for the mean time... :) thanks for all the help. @Laikoni
 
[r| ... ,r<-n<$[1..c]] should be equivalent to [n| ... ,_<-[1..c]].
 
11:17 PM
@Laikoni you're relentless. :)
 
I do my best :)
 
you can also replace the upper line in the following with the lower:
(n,a,b,c)<-[("Gas Giant",4,9,15),("Ice",4,6,10),("Ice Giant",4,6,10),("Gaia class",5,7,10),("Dense Atmosphere",7,9,10),("Desert",7,10,25),("Iron",7,10,14),("Lava",10,11,6)]
(n,a,(b,c))<-zip3["Gas Giant","Ice","Ice Giant","Gaia class","Dense Atmosphere","Desert","Iron","Lava"][4,4,4,5,7,7,7,10]$zip[9,6,6,7,9,10,10,11][15,10,10,10,10,25,14,6]
oh, @Laikoni suggested something similar already 2 hours ago :)
and if you can reorder the list you could maybe even "factor" out the " Giant"
@WillNess ^
 
@flawr I don't think so, no. (?) your suggestion shortens it by 3 more bytes, great! OTOH, what if another input has fewer entries -- then it won't be worth it.
(that was about "Laikoni suggested something similar")
I think I'll stop for now. Thanks all for the help and discussion!
 
11:38 PM
@WillNess sorry, I don't understand which part referts to what :D
 

« first day (147 days earlier)      last day (753 days later) »