Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Roo::Utils.number_to_letter #308

Merged
merged 2 commits into from
Apr 9, 2016
Merged

Update Roo::Utils.number_to_letter #308

merged 2 commits into from
Apr 9, 2016

Conversation

ilyasgaraev
Copy link

Update Roo::Utils.number_to_letter method.

MemoryProfiler results (N = 1..10000):
before:

Total allocated: 5602640 bytes (107816 objects)

allocated memory by gem
-----------------------------------
   5602640  roo/lib

allocated memory by file
-----------------------------------
   5602640  .../roo/lib/roo/utils.rb

allocated memory by location
-----------------------------------
   3512640  .../roo/lib/roo/utils.rb:35
   1690000  .../roo/lib/roo/utils.rb:39
    400000  .../roo/lib/roo/utils.rb:30

after:

Total allocated: 1570880 bytes (39272 objects)

allocated memory by gem
-----------------------------------
   1570880  roo-new/lib

allocated memory by file
-----------------------------------
   1570880  .../roo-new/lib/roo/utils.rb

allocated memory by location
-----------------------------------
   1170880  .../roo-new/lib/roo/utils.rb:35
    400000  .../roo-new/lib/roo/utils.rb:32

Benchmark results (N = 1..2000000):

Rehearsal ----------------------------------------------------------
OLD number_to_letter:    5.100000   0.000000   5.100000 (  5.111661)
NEW number_to_letter:    2.910000   0.000000   2.910000 (  2.913276)
------------------------------------------------- total: 8.010000sec

                             user     system      total        real
OLD number_to_letter:    5.020000   0.010000   5.030000 (  5.026673)
NEW number_to_letter:    2.890000   0.000000   2.890000 (  2.895102)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 94.166% when pulling 681f124 on ilyasgaraev:number-to-letter into a1cbcb7 on roo-rb:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 94.166% when pulling 908d049 on ilyasgaraev:number-to-letter into a1cbcb7 on roo-rb:master.

@stevendaniels
Copy link
Contributor

Awesome!

@stevendaniels stevendaniels merged commit b19c4ff into roo-rb:master Apr 9, 2016
@@ -2,6 +2,8 @@ module Roo
module Utils
extend self

LETTERS = ('A'..'Z').to_a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe freeze it

@ilyasgaraev ilyasgaraev deleted the number-to-letter branch June 2, 2016 12:56
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 15, 2016
## [2.5.1] 2016-08-26
### Fixed
- Fixed NameError. [337](roo-rb/roo#337)

## [2.5.0] 2016-08-21
### Fixed
- Remove tempdirs via finalizers on garbage collection. This cleans them up in all known cases, rather than just when the #close method is called. The #close method can be used to cleanup early. [329](roo-rb/roo#329)
- Fixed README.md typo [318](roo-rb/roo#318)
- Parse sheets in ODS files once to improve performance [320](roo-rb/roo#320)
- Fix some Cell conversion issues [324](roo-rb/roo#324) and [331](roo-rb/roo#331)
- Improved memory performance [332](roo-rb/roo#332)
- Added `no_hyperlinks` option to improve streamig performance [319](roo-rb/roo#319) and [333](roo-rb/roo#333)

### Deprecations
- Roo::Base::TEMP_PREFIX should be accessed via Roo::TEMP_PREFIX
- The private Roo::Base#make_tempdir is now available at the class level in
  classes that use tempdirs, added via Roo::Tempdir
=======
### Added
- Discard hiperlinks lookups to allow streaming parsing without loading whole files

## [2.4.0] 2016-05-14
### Fixed
- Fixed opening spreadsheets with charts [315](roo-rb/roo#315)
- Fixed memory issues for Roo::Utils.number_to_letter [308](roo-rb/roo#308)
- Fixed Roo::Excelx::Cell::Number to recognize floating point numbers [306](roo-rb/roo#306)
- Fixed version number in Readme.md [304](roo-rb/roo#304)

### Added
- Added initial support for HTML formatting [278](roo-rb/roo#278)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants