Closed dcurrie closed 8 years ago
I like it. I was thinking to rewrite to use vectors too but didn't have time.
@wasabiz How do you think? Do you care about API compatibility of records?
@dcurrie @KeenS
I just changed the C APIs in a different way. Record has now only one single cell and the internal representation of fields is customizable from scheme. For now I leave the representation unchanged to avoid regression, but if you update this patch, I'll merge then.
OK, I've modified contrib/20.r7rs/scheme/base.scm to adapt the new C APIs.
Beautiful!
This changes the C API for records to use integer indices into the record rather than field names. This makes records smaller, and accesses faster. The slight drawback is that it's harder to use Scheme records from C, but perhaps
data
values are better for this purpose anyway,