Code and application performance is always an interesting topic. For developers, finding and solving performance bottlenecks can be highly productive with the right tools and knowledge, and it can be a very rewarding part of application development.
Most developers find the performance of Cincom Smalltalk™ to be more than adequate, especially when compared to other dynamic languages. We have a high-performance, JIT’ed (just-in-time compilation) VM. But what if you need more?
We take the performance needs of our customers seriously and address it on a number of fronts. Here are some notes on approaches for finding performance in Cincom Smalltalk (Cincom® ObjectStudio® and Cincom® VisualWorks®):
- Big performance gains are done by changing the algorithm and approach. Smalltalk is excellent at letting you see the big picture and rearrange structure to change algorithms―seeing the forest through the trees if you will. It’s far more difficult to do this in lower-level languages since you are much more locked in to an approach.
- If there is a small, time-critical section, you can write it in C and call it from Smalltalk. Many think they will do this, but most end up not needing to when performance is better than expected.
- We have Polycephaly―a framework that lets you easily leverage multi-core processors. Many customers have adopted this and have gotten two to five times throughput improvements. Polycephaly gives you 80% of the benefits with 20% of the difficulty. Polycephaly II will be introduced in the upcoming release (preview), which lets you include remote machines.
- We have 64-bit VMs that let you utilize a very large object space. This allows some applications to keep all of the data cached in object memory, boosting performance significantly.
- It is possible to use VW with CUDA GPU acceleration for number crunching. Modern GPUs can give supercomputer-like speed to number crunching.
- We are continuing to incrementally improve the performance of our VMs. Most recently, we have improved garbage-collection performance in our VMs. This is a staid area of the VM, yet we continue to find ways to improve it.
- We have performance profiling tools to pinpoint where time is being spent, so that you can focus on areas that will give the most rewards. Research has demonstrated that developers’ guesses as to where time is spent are usually inaccurate, which is why these tools are so valuable. Our profiling tools let you find where lots of time is being spent so you can focus your efforts where it will make the most difference, or get that last increment in performance to give you the edge.
Looking back in history, Xerox PARC had bright minds and lots of money, which they used to invent many aspects of modern computing. The VM technology they created is very sophisticated and is still a significant barrier to entry in the dynamic language field. Sure the technology has been out for quite a while, but typically only companies with strong resources (think google v8 VM) have been able to do something with the sophistication of our VM technology. In the meantime, we have not sat on our laurels, but have continued to refine and improve the technology.
Did I miss any items? Let me know your thoughts!
Good luck and happy Smalltalking!