Topic awaiting preservation: Unreadable code anyone? (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Sweden |
posted 09-19-2004 15:56
I've noticed that some people (none at this forum that I know of lol) always write their code |
Nervous Wreck (II) Inmate From: Sweden |
posted 09-22-2004 09:31
Nobody who wants to help? |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 09-22-2004 10:24
well... I've written a pretty printer or two in the past, and if they're actually using the language's backus-naur form definition, they're pretty reliable. |
Nervous Wreck (II) Inmate From: Sweden |
posted 09-22-2004 11:39
Good idea, should have thought about that myself.... |
Nervous Wreck (II) Inmate From: Sweden |
posted 09-22-2004 12:04
Double post, ignore this. |
Obsessive-Compulsive (I) Inmate From: Christchurch |
posted 09-23-2004 21:06
I've started compressing my code before putting it online. Of course, I keep an uncompressed copy here. I've found that removing whitespace makes the file about 10% smaller. I also remember reading that it improves script running speed, which is important for my use. |
Nervous Wreck (II) Inmate From: Sweden |
posted 09-24-2004 23:25
I don't know exactly what you mean by "remapping" objects but I'm sure renaming variables to shorter names will improve download speeds. But I'm not sure it would improve execution speed, maybe slightly but probably not enough to make a difference. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 09-25-2004 17:50
I suspect you mean pulling variables into local scope |
Obsessive-Compulsive (I) Inmate From: Christchurch |
posted 09-26-2004 01:03
Hi TwoD, |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 09-26-2004 09:37
Well... I'm no expert. I believe to have heard that Firefox is rather slow with object look ups, but it might have been the other way around. |
Nervous Wreck (II) Inmate From: Sweden |
posted 09-26-2004 22:07
I wonder if remapping this way really pulls the object into local scope, or just gives it a local handle... no way to tell is there? |
Obsessive-Compulsive (I) Inmate From: Christchurch |
posted 09-27-2004 01:39
I've had no problem with the optimizer removing whitespace. I don't let it rename variables and functions because its too risky. I tried it once, and it seemed to be fine but then I discovered an error. It had renamed all the variables and functions in the code fine, but one of my document.writes contained an a href to a function. It did not rename the function call in the document.write, but it did rename the function. |