Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark elm - Pass all of a Model of just sub-parts of it #12

Open
arbus opened this issue Feb 28, 2019 · 2 comments
Open

Benchmark elm - Pass all of a Model of just sub-parts of it #12

arbus opened this issue Feb 28, 2019 · 2 comments
Assignees
Labels
Post Idea Ideas for blog posts

Comments

@arbus
Copy link
Member

arbus commented Feb 28, 2019

No description provided.

@arbus arbus added the Post Idea Ideas for blog posts label Feb 28, 2019
@arbus arbus changed the title Benchmark elm on the effects on all of a Model or just the fields that on needed Benchmark elm - Pass all of a Model of just sub-parts of it Feb 28, 2019
@arbus
Copy link
Member Author

arbus commented Feb 28, 2019

The view function of a given page is usually made up of multiple sub-view functions which only operate on a small part of the Model of the page.

The aim is to benchmark what the performance implications are for passing all of a model or just the fields that are necessary to these sub-view functions

@turboMaCk
Copy link
Member

turboMaCk commented Apr 11, 2020

I think there won't be huge performance difference between the two approaches. Elm compiles to JS and in JavaScript, and even though it uses call by value semantics, objects are references. Based on that I think it doesn't really matter if large or small record is being passed. I believe run-time is always copying just a reference to object which should be of same size in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Post Idea Ideas for blog posts
Projects
None yet
Development

No branches or pull requests

3 participants