Author Topic: Two Questions about Usage and Performance  (Read 3455 times)

newbie73

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Two Questions about Usage and Performance
« on: July 22, 2010, 01:10:40 PM »
1. Have you done any performance comparisons between running similar code in Python vs VBA?  What are the results like?


2. How are others using PyXLL? What industries and in what capacity?

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 610
  • Karma: +14/-1
    • View Profile
Re: Two Questions about Usage and Performance
« Reply #1 on: July 25, 2010, 02:04:34 PM »
Hi,

doing a proper analysis of the performance of python vs VBA is not something I've gone into in any great detail. The trouble with performance testing of this nature is that the use cases vary hugely between applications. I'm reluctant to give numbers comparing the two because they will always be different in real-life cases and therefore are not of huge value in my mind.

If you have a copy of Steve Dalton's book on Excel programming, in there he gives the results of some tests that compare the speed of C++ code vs VBA which show C++ to be several orders of magnitude faster than VBA. While Python is of course going to be slower in many cases than the equivalent C++ code, the nice thing about it is that you always have the option to easily drop down to C or C++ with tools like Cython, SWIG and boost python (as well as the CPython API itself).

I would encourage you to try a simple case you're comfortable with and see what results you get for yourself. There are a few python profiling toolkits available in the standard library as well, so it should be possible to find hotspots in your code and identify areas to optimize if you need to.

The majority of interest has come from the financial services industry; front office IT and quant developers being the main users. There has also been interest from engineering companies and educational users in universities and schools.

People are using it in a variety of different ways. Many people have python experience and python libraries they want to be able to use in Excel. Others are building code from scratch that they want to interact with in Excel as they see python as a more flexible, productive and maintainable solution than writing VBA or C++.

I hope this has answered your questions,

Best regards,
Tony.