winterland1989 / hetero-dict

Fast heterogeneous data structures.
MIT License
7 stars 0 forks source link

benchmark vinyl #1

Closed sboosali closed 8 years ago

sboosali commented 8 years ago

http://pastebin.com/CcLLMtcE

vinyl seems as fast.

(i don't have much experience with benchmarking, so take this with a grain of salt.)

vinyl's fields are strict, and the getter/setter are methods, which provides static dispatch (i think?).

winterland1989 commented 8 years ago

Interesting result, i'll look into the benchmark anyway, because i don't think i'm doing it right myself. BTW. would you please take care of the CI failure?

sboosali commented 8 years ago

ah, i rushed. i ran on a newer ghc. i'll remove the extension.

mind if i add a stack.yaml for the minimum compiler version?

On Wed, Jun 1, 2016 at 7:47 PM, winterland notifications@github.com wrote:

Interesting result, i'll look into the benchmark anyway, because i don't think i'm doing it right myself. BTW. would you please take care of the CI failure?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/winterland1989/hetero-dict/pull/1#issuecomment-223054239, or mute the thread https://github.com/notifications/unsubscribe/ACNoMVA4KeDnxwOyorncfinESPu5e0wwks5qHbezgaJpZM4IruPO .

(this message was composed with dictation: charitably interpret typos)Sam Boosalis

sboosali commented 8 years ago

okay it seems to build on 7.8

winterland1989 commented 8 years ago

After some digging, i think i'm doing it wrong in the first place, most of the time are spend on evaluate the tuple into normal form, but Seq is slow for small n indeed, so i'm going to move DynDict to linked-list. Early benchmark shows that i can do better than vinyl, but i think that's because DynDict provide less powerful APIs.

One thing i don't like vinyl is that it's really easy to blow up type-checker, i have to add annotations in a lot of places, and the compile time is horrible. Do you come across situations like such(for example, use vinyl to create a record will more than 20 fields, my ghc just hang...)

winterland1989 commented 8 years ago

I'll try to add a stack.yaml

sboosali commented 8 years ago

Ah, I've only used records with a few fields. Can you link the program that hangs? That would be good to know.

On Thu, Jun 2, 2016 at 1:30 PM, winterland notifications@github.com wrote:

After some digging, i think i'm doing it wrong in the first place, most of the time are spend on evaluate the tuple into normal form, but Seq is slow for small n indeed, so i'm going to move DynDict to linked-list. Early benchmark shows that i can do better than vinyl, but i think that's because DynDict provide less powerful APIs.

One thing i don't like vinyl is that it's really easy to blow up type-checker, i have to add annotations in a lot of places, and the compile time is horrible. Do you come across situations like such(for example, use vinyl to create a record will more than 20 fields, my ghc just hang...)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/winterland1989/hetero-dict/pull/1#issuecomment-223254543, or mute the thread https://github.com/notifications/unsubscribe/ACNoMfoqha3n8SenBibbg-s4MRJvNknUks5qHrCvgaJpZM4IruPO .

(this message was composed with dictation: charitably interpret typos)Sam Boosalis

winterland1989 commented 8 years ago

I just increased the fields number in benchmark from 15 to 27, with foo0..foo8...