Skip Menu |

This queue is for tickets about the Inline-Struct CPAN distribution.

Report information
The Basics
Id: 100266
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Inline-Struct

People
Owner: ETJ [...] cpan.org
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Documentation: reasons to use this module
It would be useful if the documentation explained what advantages the module brings. - Are the objects faster than simple Perl blessed hash objects? (I imagine they are.) - Do the objects use less memory than simple Perl blessed hash objects? (I imagine they do.) - Does it make the objects simpler to use in Inline::C-based subs? (I imagine it does.) Some benchmarks, etc would also be appreciated.
The main advantage is what it says on the tin: a way of directly accessing C structs from Perl. However, if you have some expertise in benchmarking/profiling, well volunteered! I'll be pleased to incorporate results in a doc snippet.
And now there is documentation and a benchmark script (as of 0.15, just now). Excerpt: [R]eading the struct is faster than a simple object implemented as a hash-ref, while writing to a struct in the current implementation is several times slower. [...] The memory usage of the struct is around twice as large.