Re: How do tagged data structures work in Strongtalk?
Richard <[email protected]> Mon, 28 May 2007 01:50:12 -0700
| Newsgroups | gmane.comp.lang.smalltalk.strongtalk |
|---|---|
| Message-ID | <[email protected]> |
> > Now that I understand that doubles are boxed in strongtalk, I see that > > the example is only about time and space performance, not precision. > > Well, I hope you don't take this as a reference benchmark, because i'm > afraid it won't tell much :) Yes indeed. Small examples serve to illustrate what the strongtalk vm is doing, but for measuring performance, and thus analyzing trade- offs, one wants to run a suite of benchmarks that are derived from real programs. The example seems natural to me. x:=0. count:=10000000. a:=Array new:count. 1 to:count do: [:i| x:=x+1.13321. a at:i put:x]. sum2:=0.0. a collect:[:y| sum2:=sum2+(y*2)]. ^sum2 That looks like a representation of something fairly common in a linear algebra library (except that it is two examples stuck together). It would be nice if strongtalk were at least comparable to C with respect to linear algebra performance, but I'm also guessing that one is likely to start by wrapping one of the existing C libraries because writing such a library is non-trivial :) > Benchmarking real code might be more interressing. In my opinion, the > true strength of the strongtalk compiler is that it lets you write > many short methods and use lots of blocks with very high runtime > effiency. The compiler is not optimised much for low level number > crunching yet. Yes. As I understand so far, strongtalk is doing runtime inlining. Once the inliner has unfolded the blocks and method calls, then a dataflow optimizer is in a position to do escape analysis, remove redundant code, and perhaps even unbox double that don't escape. It makes sense to focus on a stable system with inlining first. Is there part of strongtalk that is currently doing dataflow analysis? Does this part for example remove redundant type checks? Say if two methods calls on the same object were inlined then I guess only one type check is required. regards, Richard. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Strongtalk-general" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en -~----------~----~----~----~------~----~------~--~---