Using a variant of your code, I got results like this: ReadFile: 516 msecs ReadFile: 75 msecs ReadFile: 76 msecs ReadFile: 75 msecs ...
-David Profiling shows the bulk of the time on the first iteration being taken up by the JIT-compiler. On subsequent iterations, either String.Intern or PushbackTextReader.Read is the biggest hog, depending on the profiling method. On Aug 30, 9:40 am, Jason Baker <amnorv...@gmail.com> wrote: > I've written a test that does this: > > public void ReadFile(TextReader infile) > { > using (var text_reader = new PushbackTextReader(infile)) { > LispReader.read(text_reader, false, null, true); > } > } > > ...in a loop. I'm running this operation a specified number of times > and then getting an average runtime. The thing is, if I run this more > times, the average time goes down. Is something getting cached and/or > memoized somewhere, or is this just a bad way to test performance? > > (And FYI, the TextReader that's getting passed in is a StringReader so > I can eliminate I/O time from the results) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---