in reply to How do I test the deep equality of two hash tables?
I checked with benchmark module to know which method is quick, but storable gives the result too quick than eq_deeply of Test::Deep.Too quick? I never complained that an operation was too quick.
Is Test::Deep actually too slow for you?
I couldn't understand why the test::deep is taking too much of time than storable.
Perhaps Storable does most of its work in C, while Test::Deep is pure perl?
Does eq_deeply provide any other advantage on comparison than storable?
Since Storable isn't specifically designed for comparing data, it's dangerous unless it's asserted in the docs that it'll always work.
Storable just takes a binary image of a data structure, and it knows how to reverse that process. Afaicti It doesn't guarantee that two identical data structures always result in the same binary image.
BTW you can also look at Data::Compare, which seems to do a similar job.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I test the deep equality of two hash tables?
by blazar (Canon) on Jul 04, 2008 at 07:55 UTC | |
by moritz (Cardinal) on Jul 04, 2008 at 08:11 UTC |