On Mar 8, 2009, at 9:38 PM, Rich Hickey wrote:
Do you have a case where the map-unpacking dominates the I/O time? Or is this just a speculative optimization?
I was talking about the distinction between sending N value sets across the JDBC interface in one call vs. in N calls. Unpacking maps on the Clojure side and making the same one call is a good idea. Thanks.
I want to be clear, just because things come in maps doesn't mean you can't have a higher-performance insert-uniform-records that takes maps with identical sets of keys.
Good point. To offer the most efficiency in unpacking, the API could include: insert-records each record treated independently insert-uniform-records all subsequent records contain at least all the keys of the first unpack with select-keys insert-structs all records are structs with the same basis unpack with valsMy current thinking is that insert-structs doesn't offer enough benefit over insert-uniform-records to be worth including.
--Steve
smime.p7s
Description: S/MIME cryptographic signature