We're updating the issue view to help you get more done. 

Delegate clojure.string/capitalize to goog.string/capitalize

Description

Since the implementation of clojure.string/capitalize (6 years ago), Closure library added an identical function (3 years ago), which is actually much faster:

1 2 3 4 5 cljs.user=> (simple-benchmark [s "abc"] (goog.string/capitalize s) 10000000) [s "abc"], (goog.string/capitalize s), 10000000 runs, 1181 msecs nil cljs.user=> (simple-benchmark [s "abc"] (clojure.string/capitalize s) 10000000) [s "abc"], (clojure.string/capitalize s), 10000000 runs, 5295 msecs

We could just have ClojureScript's delegate to Closure's.

Environment

None

Status

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Approval

Accepted

Patch

Code and Test

Affects versions

1.9.854

Priority

Minor