manuel-serrano / bigloo

a practical Scheme compiler
http://www-sop.inria.fr/indes/fp/Bigloo
Other
138 stars 19 forks source link

Enable jvm build of csv and improve performance of csv parsing #3

Closed donaldsonjw closed 6 years ago

donaldsonjw commented 6 years ago

It was determined that we are unnecessarily reallocating parser state for each line we read. Since the parsing is simple, we just replaces Bigloo's built-in lalr parsing facility with a hand-coded one. This eliminated the allocation on every line read and improved performance.

Note: There is one change in semantics. The old parser would return a single element list consisting of an empty string when parsing newline only line. It now returns an empty list. In my mind, this is an improvement, the other behavior could be confusing. Was there no fields or a single empty field.

manuel-serrano commented 6 years ago

Thank you very much Joe of these improvements.