 |
Sunday, June 29, 2003 |
Random notes from "app-building":
- the CLR Allocation Profiler is HOT
- changing tr.ReadLine() to tr.Read(buffer, 0, width) against a char[] buffer really decreased my allocs by almost two orders of magnitude... once I fixed the issues with leading/trailing whitespace
- enum Foo will default to enum Foo: int32... when I had new Foo[1024, 768], it took up a lot way, way more memory than when I made it enum Foo: byte
- using the BinaryFormatter to save recovery information (ie, best solutions so far) was very helpful & easy
- struct vs class can help/hurt but it's hard to guess which way
- the IL for SomeEnum Lookup(string s) { switch (s) { case "foo": return SomeEnum.X; ... } } is interesting once optimized
2:01:13 PM
|
|
Woo-hoo! I got a solution for the ICFP 2003 problem... Of course, it's totally sub-optimal, but I doubted I could even do it...
1532 lines of C#...
5:07:22 AM
|
|
© Copyright 2003 John Lambert jlambert@jlambert.com

|
|
|