Closed aconchillo closed 9 months ago
Performance with this change is affected a bit with large files because of having to create new hash tables and add items to it:
With this patch:
scheme@(guile-user)> ,t (->bool (call-with-input-file "large-file.json" (lambda (port) (json->scm port))))
$7 = #t
;; 1.364272s real time, 2.084502s run time. 0.823799s spent in GC.
With current behavior:
scheme@(guile-user)> ,t (->bool (call-with-input-file "large-file.json" (lambda (port) (json->scm port))))
$4 = #t
;; 1.262949s real time, 2.199526s run time. 1.057755s spent in GC.
Closing in favor of #85 since it's more performant. If in the future there's a performant issue we might consider this one, but I think it should be good for now.
This patch adds support for handling duplicate keys. If a duplicate key is found in an object the last value will be used. If #ordered is used, the first appearance of the key is considered in the order.
Fixes #84