Title: modified Vector v4 equality check by adnanmuttaleb · Pull Request #35 · fluentpython/example-code · GitHub
Open Graph Title: modified Vector v4 equality check by adnanmuttaleb · Pull Request #35 · fluentpython/example-code
X Title: modified Vector v4 equality check by adnanmuttaleb · Pull Request #35 · fluentpython/example-code
Description: According to my understanding of hashing and equality, I tried to enhance the performance of equality checking by ensuring that __eq__ does not perform component based comparison only if vectors has the same hash values (if two hashes is different then the two vectors are definitely unequal). because if two vectors has same hash value then: either they equal they are not equal `Vector(1, 0, -1)` and `Vector(1, -1, 0)` will have the same hash value of -2
Open Graph Description: According to my understanding of hashing and equality, I tried to enhance the performance of equality checking by ensuring that __eq__ does not perform component based comparison only if vectors h...
X Description: According to my understanding of hashing and equality, I tried to enhance the performance of equality checking by ensuring that __eq__ does not perform component based comparison only if vectors h...
Opengraph URL: https://github.com/fluentpython/example-code/pull/35
X: @github
Domain: redirect.github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:07dd9328-ff9a-84a9-4f6c-0cf297531414 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E2A2:19A1E9:7A098F1:A161FE5:696DEF81 |
| html-safe-nonce | 9dd78f1878ba82068942bb0746faca85821851af829f73cd15c11ba5f1872964 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkEyOjE5QTFFOTo3QTA5OEYxOkExNjFGRTU6Njk2REVGODEiLCJ2aXNpdG9yX2lkIjoiMTM0MjkxODM1MjYwNTkzMzQ0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5a48fa0199d1275c5e592e222a5c6c8dfbd783b35728c3f8c7c72c540b2084f0 |
| hovercard-subject-tag | pull_request:333493053 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/fluentpython/example-code/pull/35/checks |
| twitter:image | https://avatars.githubusercontent.com/u/9295683?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9295683?s=400&v=4 |
| og:image:alt | According to my understanding of hashing and equality, I tried to enhance the performance of equality checking by ensuring that __eq__ does not perform component based comparison only if vectors h... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/fluentpython/example-code git https://github.com/fluentpython/example-code.git |
| octolytics-dimension-user_id | 9216311 |
| octolytics-dimension-user_login | fluentpython |
| octolytics-dimension-repository_id | 25216588 |
| octolytics-dimension-repository_nwo | fluentpython/example-code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 25216588 |
| octolytics-dimension-repository_network_root_nwo | fluentpython/example-code |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width