banister / method_source

return the sourcecode for a method
MIT License
361 stars 43 forks source link

Make `extract_last_comment` 65x faster #78

Open symwell opened 2 years ago

symwell commented 2 years ago

Parse comments backwards in extract_last_comment.

When used with a benchmark that called extract_last_comment 56411 times this improved performance by 65.4x. It reduced execution time from 20.15s to 0.31s.