Skip to content

Commit 392c054

Browse files
committed
Related #32: remove fast-memoize for faster load
1 parent e3680ee commit 392c054

File tree

3 files changed

+4
-66
lines changed

3 files changed

+4
-66
lines changed

Diff for: bin/bb-test-runner.clj

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
(:require [clojure.test :as t]
44
[babashka.classpath :as cp]))
55

6-
(def require-nsyms ['java-time.potemkin.util
7-
'java-time.joda
6+
(def require-nsyms ['java-time.joda
87
'java-time.core
98
'java-time.properties
109
'java-time.util

Diff for: src/java_time/graph.cljc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(ns java-time.graph
22
(:require [clojure.set :as sets]
33
[clojure.string :as string]
4-
[java-time.potemkin.util :as u]
54
[java-time.util :as jt.u])
65
#?@(:bb []
76
:default [(:import [java.util PriorityQueue])]))
@@ -65,7 +64,7 @@
6564

6665
(def assignable?
6766
^{:doc "True if `a` is assignable to `b`, e.g. Integer is assignable to Number."}
68-
(u/fast-memoize
67+
(memoize
6968
(fn [^Types a ^Types b]
7069
(or (= a b)
7170
(and (= (.arity a) (.arity b))
@@ -98,7 +97,7 @@
9897
(map first (combos n s))))
9998

10099
(def continuous-combinations
101-
(u/fast-memoize
100+
(memoize
102101
(fn [n]
103102
(let [rng (range n)]
104103
(into [] (comp (map inc)
@@ -313,7 +312,7 @@
313312
g)))
314313

315314
(def conversion-path
316-
(u/fast-memoize
315+
(memoize
317316
(fn [^ConversionGraph g, ^Types src, ^Types dst]
318317
(when (has-source-type? g src dst)
319318
(let [g' (expand-frontier g src max-extent)]

Diff for: src/java_time/potemkin/util.cljc

-60
This file was deleted.

0 commit comments

Comments
 (0)