{"id":20301299,"url":"https://github.com/palisades-lakes/multimethod-experiments","last_synced_at":"2025-04-11T13:36:26.597Z","repository":{"id":62434085,"uuid":"99736710","full_name":"palisades-lakes/multimethod-experiments","owner":"palisades-lakes","description":"Experiments with implementation and design variations related to Clojure's `defmulti`/`defmethod`/`MultiFn`.","archived":false,"fork":false,"pushed_at":"2023-08-01T19:08:46.000Z","size":9826,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T09:49:25.571Z","etag":null,"topics":["benchmark","clojure-multimethods","generic-functions","multimethods"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palisades-lakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-08T21:14:10.000Z","updated_at":"2023-08-01T19:08:51.000Z","dependencies_parsed_at":"2024-11-15T00:46:00.624Z","dependency_job_id":"35be84d4-caa2-444f-a7b1-22e9573b80c5","html_url":"https://github.com/palisades-lakes/multimethod-experiments","commit_stats":{"total_commits":143,"total_committers":2,"mean_commits":71.5,"dds":0.006993006993006978,"last_synced_commit":"d8382c2d4edfe8361a00a2defaead853973aef91"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fmultimethod-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fmultimethod-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fmultimethod-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palisades-lakes%2Fmultimethod-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palisades-lakes","download_url":"https://codeload.github.com/palisades-lakes/multimethod-experiments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410168,"owners_count":21098772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","clojure-multimethods","generic-functions","multimethods"],"created_at":"2024-11-14T16:25:16.000Z","updated_at":"2025-04-11T13:36:26.558Z","avatar_url":"https://github.com/palisades-lakes.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multimethod-experiments \n\n[![Clojars Project](https://img.shields.io/clojars/v/palisades-lakes/multimethod-experiments.svg)](https://clojars.org/palisades-lakes/multimethod-experiments)\n\nThis repository is intended as something like reproducible research,\nto document in detail what led to 2 libraries:\n\n- [faster-multimethods](https://github.com/palisades-lakes/faster-multimethods):\na faster backwards-compatible alternative to the Clojure 1.8.0\nimplementation,\n\n- [dynamic-functions](https://github.com/palisades-lakes/dynamic-functions):\nnot backwards compatible, more restricted than Clojure multimethods, but faster still.\n\nClojure provides about a dozen competing \nvariations on 'object-oriented' or 'polymorphic' functionality, \nincluding:\n`definterface`, `defmulti`/`defmethod`, multi-arity `defn`,\n`defprotocol`, `defrecord`, `defstruct`, `deftype`, \n`gen-class`, `reify`, and `proxy`.\nSee Chas Emerick's [Flowchart for choosing the right Clojure type definition form](https://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/) \nfor a comparison and evaluation of when to use which.\n(Note that it doesn't include `defmulti`/`defmethod`.)\n\nOf the non-deprecated ones, `defmulti`/`defmethod` seems to one of \nthe least used (though I have no hard data for that). \nThis may in part be due to the general advice on the web, \nwhich is to use `defprotocol` rather than `defmulti`, because\n`defmutli` is 'slow' by comparison.\n\nThe motivation for this project was, first, to create some realistic\nenough benchmarks (at least for the kinds of problems I work on)\nto measure the cost of using `defmulti`  versus various alternatives.\nSecond, I wanted to understand the current Clojure implementation.\nThird, I was curious whether significant performance improvements\ncan be achieved with small changes to the existing implementation,\nprovided as a library layered on top of Clojure,\nor would compiler level changes be required.\n\nFor general background on generic functions (aka multimethods), \nfrom my perspective, \nsee [generic_functions](docs/generic_functions.md).\n\nFor notes on the Clojure 1.8.0 implementation,\nsee [Clojure 1.8.0 multimethods](docs/implementation_notes_1.8.0.md).\n\nFor descriptions of the current benchmarks, and results, \nsee [benchmarks](docs/benchmarks.md).\n\n\n## Installation\n\nClone the repository and build from source using Maven, \nfor example: \n```\nmvn package\n```\n\n## License\n\nCopyright © 2017 John Alan McDonald \u003cpalisades dot lakes at gmail dot com\u003e\n\n[Apache 2.0](LICENSE)\n\n## Acknowledgments\n\n### ![Yourkit](https://www.yourkit.com/images/yklogo.png)\n\nYourKit is kindly supporting open source projects with its full-featured Java\nProfiler.\n\nYourKit, LLC is the creator of innovative and intelligent tools for profiling\nJava and .NET applications. Take a look at YourKit's leading software products:\n\n* \u003ca href=\"http://www.yourkit.com/java/profiler/index.jsp\"\u003eYourKit Java Profiler\u003c/a\u003e and\n* \u003ca href=\"http://www.yourkit.com/.net/profiler/index.jsp\"\u003eYourKit .NET Profiler\u003c/a\u003e.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalisades-lakes%2Fmultimethod-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalisades-lakes%2Fmultimethod-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalisades-lakes%2Fmultimethod-experiments/lists"}