dsteem vs. steem-js — Round 1

last month
58 in steemdev

@good-karma suggested that I should setup a performance test of dsteem and compare it to the official steem-js library and I was happy to oblige. The results really surprised me however, I expected dsteem to maybe be a little bit faster but the results show that dsteem is ~90 times faster than steem-js!

bm

I setup the test to cover the most common and compute intensive operation I could think of (deserializing a private key and using that to sign a transaction). You can check how it's setup and run it for yourself here: https://jsperf.com/dsteem-vs-steem-js/1


Update: In node.js dsteem pulls ahead with another order of magnitude, more than 1000 times faster! Probably because many of the crypto functions I'm using have native bindings when running in node.

Screen Shot 2017-07-09 at 12.30.16.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  trending
73
  ·  last month

Surprisingly big difference than I expected! :) looking forward to round 2...

·
58
  ·  last month

You and me both :)

60
  ·  last month

great contribution!
i wish we could update the steem js library asap with your solution or simply update with your contribution so the whole ecosystem can benefit this great improvement

57
  ·  last month

Wow, that's awesome. I'm curious about read operations - have you benchmarked any of those? get_state etc?

·
58
  ·  last month

Thanks! No, I haven't. I think the differences should be negligible unless steem-js is doing something really weird :)

·
·
57
  ·  last month

That was my thought as well - but this is still a great boost in performance for transactions that require signing. Are you using anything non-standard? Is this most likely a difference in use of different libraries?

·
·
·
58
  ·  last month

I haven't profiled it but my guess is that a large part of the performance improvement is coming from the node-secp256k1 package. The browserify crypto implementations are really good as well.

63
  ·  last month

8.92 vs 813
I was looking for a missing dot.
Great work!

·
58
  ·  last month

Haha I did as well when running it for the first time, had to double check that my lib wasn't running in neutral :D

53
  ·  last month

good job!

·
58
  ·  last month

Thanks man!

52
  ·  last month

Wow, that is a BIG difference, good job!

·
58
  ·  last month

Thanks! :)

44
  ·  last month

Awesome job! How far into development is dsteem currently?

·
58
  ·  last month

Thanks! I hate giving estimates but 70% maybe? :)

·
·
44
  ·  last month

Ah, fair enough, as soon as I finish my final exams I shall give it a go, looks awesome though

56
  ·  last month

Wow impressive results, great work!

·
58
  ·  last month

Thanks!

64
  ·  last month

Well, Damn! :O

Looking forward to fiddling with dsteem

58
  ·  last month

Very nice!

45
  ·  last month

Upvoted & Resteemed!

34
  ·  last month

Thanks for the tip!!

46
  ·  last month

Good
Followed , upvoted