-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Optimizations for script.toAddress()
#1296
Conversation
script.toAddress()
@@ -505,3 +504,5 @@ Address.prototype.inspect = function() { | |||
}; | |||
|
|||
module.exports = Address; | |||
|
|||
var Script = require('./script'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves the circular dependency between address.js
and script.js
without needing to have several address.js
require statements in functions in script.js
that slowed each function down each time it was invoked. Using a late definition here is faster.
LGTM |
LGTM |
Optimizations for `script.toAddress()`
Several optimizations for
script.toAddress()
for around a 4x speed improvement.