9

I have an interpreter for a lisp-style language in F#, and have just gotten into the optimization phase. Simple tests of the evaluator reveal that I need to optimize it in an extreme manner. However, I don't have a general background in F# performance or optimization.

Are there any good general knowledge resources for F# program optimization? Particularly useful are tips of keeping cache coherency and surprising primitive performance issues. A cursory search hasn't revealed much on the internet.

Thank you!

Bryan Edds
  • 1,696
  • 12
  • 28
  • 5
    There's no solution for all problems. If you describe a concrete issue, people will try to help you out. – pad Feb 12 '12 at 21:22
  • 4
    You optimize F# programs the same way as any other programs: by profiling and then trying to speed up the parts of the code that make up biggest part of time. – svick Feb 12 '12 at 21:35
  • 1
    If you have an interpreter then the best optimization (to improve the run-time performance of the code it generates) is surely to convert it into a compiler. – J D Feb 13 '12 at 20:25
  • 2
    I was really just trying to ask what existing resources are available to help build the knowledge background necessary to understand how to optimize existing F# code / algorithms / program structure as well as how to spot inefficient F# code / idioms in the first place. I'm mostly looking for which books and tutorials have info relevant to that. Should I repost the question in that form? – Bryan Edds Feb 17 '12 at 02:04

1 Answers1

8

Performance optimization tricks are all myths. As @svick said, it's no better way than profiling your program, identifying hot spots and optimizing them using concrete benchmarks.

Since you asked, here is some information floating around:

Community
  • 1
  • 1
pad
  • 41,040
  • 7
  • 92
  • 166