fast-crystal icon indicating copy to clipboard operation
fast-crystal copied to clipboard

add more detailed infos/ notes/ possible advice

Open ghost opened this issue 6 years ago • 1 comments

could be nice to add inline code notes e.g. dup vs clone where clone duplicates values, which explains why it is slower

on the parts where performance is identical it would be ideal to compare IR code additionally and then potentially eliminate the "slower/ fastet statement" where it is only because of measurement errors

general things like "tuple is faster than array, tuple is like struct" would be good (with a note that struct is stack allocated)

the regexp comparison could be expanded by a third option where the regexp object is created before the benchmark, see your markdown parser

thanks for the compilation of tests though, something to keep in mind at times

ghost avatar Sep 28 '17 14:09 ghost

This could be taken a step further by providing possible code refactoring rules (perhaps with a tool like comby.dev). They could be sorted by speed and rated by other code metrics such as readability, brevity, security, etc. However, automating such transformations may be outside of the author's originally intended scope for fast-crystal.

decal avatar May 29 '20 03:05 decal