tag:blogger.com,1999:blog-158415766153663860.post2165598121646309926..comments2022-11-16T23:50:03.628-08:00Comments on { "blog" : "brusic" }: Machine Learning Ex2 - BenchmarksIvan Brusichttp://www.blogger.com/profile/02435401670390574376noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-158415766153663860.post-35364535343717442652011-09-05T07:03:54.118-07:002011-09-05T07:03:54.118-07:00(I'm the first Anonymous)
If you have code wh...(I'm the first Anonymous)<br /><br />If you have code which have to be benchmarked then this code will probably run for a long time. And then the warm up time of the jvm isn't interesting any more.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-40716767059878969912011-09-04T07:12:07.131-07:002011-09-04T07:12:07.131-07:00RJN,
Octave was used in this example. I wished wh...RJN, <br />Octave was used in this example. I wished whoever posted the story to Hacker News did not used the title he/she did since the intent was never to be an absolute benchmark. Do not have MATLAB, so I cannot benchmark it in any way. Perhaps there is an EC2 instance with MATLAB already installed? <br /><br />Anon 3:13,<br />Graphs or tables would have only helped the notion that the benchmark was significant. I do not think the resulting numbers can be used to create a definitive benchmark. However, I did find the results of the Scala solutions to be interesting since it highlighted the optimization process of the JVM and I did want to plot those values.Ivan Brusichttps://www.blogger.com/profile/02435401670390574376noreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-49158388975171682152011-09-02T12:13:37.644-07:002011-09-02T12:13:37.644-07:00a pet peeve but ... if you want to compare things ...a pet peeve but ... if you want to compare things ... a graph or table putting the data side by side does wonders for readability and flow of arguments.<br /><br />my 2 cents.<br /><br />-- Anonymous CowardAnonhttp://google.com/noreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-65649431983372930372011-09-02T10:11:15.014-07:002011-09-02T10:11:15.014-07:00Are you using MATLAB or Octave? At the top you sh...Are you using MATLAB or Octave? At the top you show the Octave version, but then refer to MATLAB throughout the rest of the post. Octave and MATLAB are not the same things -- MATLAB is likely to be much more optimized than Octave. Please clarify.RJ Nowlinghttps://www.blogger.com/profile/12181977869649766151noreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-43093611262648727442011-09-02T09:54:21.330-07:002011-09-02T09:54:21.330-07:00I was wondering why these comments were appearing ...I was wondering why these comments were appearing days after posting the article. Google Analytics tells me Hacker News is linking to me. Welcome!<br /><br />I encourage everyone to read the original post. The goal is to learn the math involved in the algorithms, not to simply create the fastest version. I also encourage everyone to create your own implementation in numpy/scipy/Ruby/Clojure/C++/whatever and share with the world.Ivan Brusichttps://www.blogger.com/profile/02435401670390574376noreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-33657710621943160632011-09-02T09:41:26.034-07:002011-09-02T09:41:26.034-07:00what you going to do in that 0.01 second? :)what you going to do in that 0.01 second? :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-12025395027396983542011-09-02T09:06:49.627-07:002011-09-02T09:06:49.627-07:00Because profiling in matlab is so easy, it might b...Because profiling in matlab is so easy, it might be interesting to profile the routine and see where the hot spots are in the matlab version at least. If it's all linear algebra kernels (* or inv or whatever) then that would explain why the floor is where it is.<br /><br />>> profile on; run_the_code; profile report<br /><br />is all you need.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-51412153545913683152011-09-02T09:00:39.595-07:002011-09-02T09:00:39.595-07:00Anonymous,
I suspected that the hotspot optimizat...Anonymous,<br /><br />I suspected that the hotspot optimization was kicking in, but I have never profiled code at such a micro-level, therefore I have seen the optimization in action. Interesting stuff. The JVM is one part of why Scala has become my goto language.<br /><br />However, ignoring the startup time might result in an apples to oranges comparison. If a code is only meant to be executed once, then startup time is important if doing side-by-side evaluations. It would be interesting to see if the code can be bootstrapped by using a small set of fake data and a low number of iterations.Ivan Brusichttps://www.blogger.com/profile/02435401670390574376noreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-25247525290449261202011-09-02T08:45:04.384-07:002011-09-02T08:45:04.384-07:00If the jvm jit is similar to the clr jit the you w...If the jvm jit is similar to the clr jit the you will always pay the byte code to native compile and optimilization cost the first time a routine is executed. The fully optimilized code is then used for all further ititations.Ryan Barrettnoreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-30795727479255481112011-09-02T06:09:53.463-07:002011-09-02T06:09:53.463-07:00The first several passes on the JVM will always be...The first several passes on the JVM will always be slow. IMHO the jvm hotspot/jit etc. is optimized for a scenario where the same code is running for a long time.<br /><br />So if you don't want to benchmark the startup time then let your algorithm run for 100 iterations (or even more i don't know that exactly) and then start your benchmark.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-158415766153663860.post-13955580154977725872011-09-01T11:05:25.047-07:002011-09-01T11:05:25.047-07:00Very coolVery coolDustin Ted Whitneyhttps://www.blogger.com/profile/17414601526967838823noreply@blogger.com