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

Magic method access test #80

Open
Perun89 opened this issue Jan 24, 2021 · 1 comment
Open

Magic method access test #80

Perun89 opened this issue Jan 24, 2021 · 1 comment

Comments

@Perun89
Copy link

Perun89 commented Jan 24, 2021

Hi, just by brief looking at your code I noticed that you actually measure time with an instantiation of an object. That could possibly distort the results quite a bit since instantiation of an object is usually much more expensive then accessing method.
Meaning that if lets say creating new instance needs 100 units of time, getting property without magic method takes 1 and with magic method takes 10 your results will be 101 units without magic method and 110 with magic method.
This way it looks like it is only about 10% faster. But if you do it without the instantiation you will get 1 to 10 which is actually 10x faster, in percent its 1000%.
Because of that I would like to ask you to either remake your test and do it again.

@TIGERB
Copy link
Owner

TIGERB commented Jan 29, 2021

Thx Brother,I will check it.

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

No branches or pull requests

2 participants