         app (middleware/chain mw identity)]
 
     ;; 1000ns
+    ;;   18ns (identity)
     (title "middleware - map")
     (expected! (app map-request))
     (cc/quick-bench
       (app map-request))
 
     ;;  365ns
+    ;;   21ns (identity)
     (title "middleware - record")
     (expected! (app record-request))
     (cc/quick-bench
       (app record-request))
 
-    ;; 6900ns
+    ;;  6900ns
+    ;; 10000ns (identity)
     (title "middleware - dynamic")
     (expected! ((middleware/chain mw identity) record-request))
     (cc/quick-bench

(defn pedestal-chain-text []
  (let [is (map io.pedestal.interceptor/interceptor
                (map (fn [value]
                       {:enter (interceptor value)}) (range +items+)))
        ctx (io.pedestal.interceptor.chain/enqueue nil is)]

    ;; 8400ns
    (title "pedestal")
    (cc/quick-bench
      (io.pedestal.interceptor.chain/execute ctx))))

#_(defn pedestal-tuned-chain-text []
    (let [is (map io.pedestal.interceptor/interceptor
                  (map (fn [value]
                         {:enter (interceptor value)}) (range +items+)))
          ctx (reitit.chain/map->Context (reitit.chain/enqueue nil is))]

      ;; 67 µs
      (title "pedestal - tuned")
      (cc/quick-bench
        (reitit.chain/execute ctx))))

;;
;; Naive chain

            [reitit.interceptor :as interceptor]

            reitit.chain
            sieppari.queue
            sieppari.core
            io.pedestal.interceptor
            io.pedestal.interceptor.chain))

