in reply to Re^2: Embedding Perl / C++ structure question
in thread Embedding Perl / C++ structure question
If you're going to pass a couple of thousands of structs containing many properties in a list (or nested) and you only really want to query a few of those properties in your perl code, you may well spend much more time converting all the data than you really need, while if you use objects you generally convert the property from perl to C or vice versa each time you access it from perl (but you don't need to convert anything you're not actually accessing).
Using objects instead of complex nested hashes may also be more efficient when you're modifying the structures, since it's usually trivial to keep the C and perl side in sync when you're using objects, while otherwise you're have to inspect the complete structure each time you pass it from C to perl to C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Embedding Perl / C++ structure question
by TheGeniuS (Novice) on Nov 28, 2007 at 22:08 UTC | |
by perlsyntax (Pilgrim) on Nov 28, 2007 at 22:57 UTC |