kz26/PyExcelerate — pull request #13 by jmcnamara (2013-10-10 18:20:59+00:00)
Title: Some benchmark optimisations

The `ws[row][col]` changes in the `pyexcelerate` formatting benchmark slow it down significantly. Probably due to the fact that it is creating a Range object for each cell. Using the `set_cell_value()` method improves the performance.

The majority of the rest of the slowdown could probably be avoided by using similar methods for setting the cell styles. (I see that there are some methods available but I didn't try them).

Also, the `run_xlsxwriter_optimization()` benchmark is sub-optimal since it creates a `format` object each time through the inner loop. I've modified that benchmark to reflect how it would be done in practice by moving the format creation out of the loop.