+-+-+ +-+ +-+-+-+-+
|G|O| |4| |H|I|V|E|
+-+-+ +-+ +-+-+-+-+

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

dsteem vs. steem-js — Round 1

BY: @almost-digital | CREATED: July 9, 2017, 7:39 a.m. | VOTES: 57 | PAYOUT: $159.51 | [ VOTE ]

@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!

[IMAGE: https://steemitimages.com/DQmULPux9wcYyJ6boZSfbXp8eBBrjYNyudqzzXx8aVNc6DN/Screen%20Shot%202017-07-09%20at%2009.05.13.png]

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.

[IMAGE: https://steemitimages.com/DQmbjCUapWZahznc4EV6sizqRcwV1PafFRRE1BykiecaajC/Screen%20Shot%202017-07-09%20at%2012.30.16.png]

TAGS: [ #steemdev ] [ #programming ] [ #steem ] [ #steemit ] [ #benchmark ]

Replies

@ahmedezzat | July 9, 2017, 7:41 a.m. | Votes: 0 | [ VOTE ]

Good
Followed , upvoted

@runningtree | July 9, 2017, 7:44 a.m. | Votes: 1 | [ VOTE ]

Thanks for the tip!!

@heejin | July 9, 2017, 7:47 a.m. | Votes: 1 | [ VOTE ]

good job!

@almost-digital | July 9, 2017, 7:55 a.m. | Votes: 0 | [ VOTE ]

Thanks man!

@good-karma | July 9, 2017, 7:59 a.m. | Votes: 6 | [ VOTE ]

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

@almost-digital | July 9, 2017, 8:21 a.m. | Votes: 0 | [ VOTE ]

You and me both :)

@gtg | July 9, 2017, 9:24 a.m. | Votes: 1 | [ VOTE ]

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

@almost-digital | July 9, 2017, 9:57 a.m. | Votes: 0 | [ VOTE ]

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

@almvide | July 9, 2017, 9:26 a.m. | Votes: 1 | [ VOTE ]

Wow, that is a BIG difference, good job!

@almost-digital | July 9, 2017, 9:57 a.m. | Votes: 0 | [ VOTE ]

Thanks! :)

@fabien | July 9, 2017, 10:54 a.m. | Votes: 2 | [ VOTE ]

Wow impressive results, great work!

@almost-digital | July 9, 2017, 11:04 a.m. | Votes: 0 | [ VOTE ]

Thanks!

@geekpower | July 9, 2017, 11:52 a.m. | Votes: 0 | [ VOTE ]

Upvoted & Resteemed!

@kdcory | July 9, 2017, 12:58 p.m. | Votes: 1 | [ VOTE ]

Awesome job! How far into development is dsteem currently?

@almost-digital | July 9, 2017, 6:09 p.m. | Votes: 0 | [ VOTE ]

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

@kdcory | July 10, 2017, 6:59 p.m. | Votes: 0 | [ VOTE ]

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

@isteemit | July 9, 2017, 2:44 p.m. | Votes: 1 | [ VOTE ]

Well, Damn! :O

Looking forward to fiddling with dsteem

@steemreports | July 9, 2017, 5:56 p.m. | Votes: 1 | [ VOTE ]

Very nice!

@justinw | July 9, 2017, 10:18 p.m. | Votes: 1 | [ VOTE ]

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

@almost-digital | July 10, 2017, 7:49 a.m. | Votes: 2 | [ VOTE ]

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

@justinw | July 10, 2017, 4:25 p.m. | Votes: 0 | [ VOTE ]

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?

@almost-digital | July 11, 2017, 8:16 a.m. | Votes: 1 | [ VOTE ]

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.

@ekitcho | July 10, 2017, 4:10 a.m. | Votes: 2 | [ VOTE ]

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

@swtcamito | July 19, 2017, 1:45 p.m. | Votes: 1 | [ VOTE ]

why you cheat with me ? why you negative vote in my post ?
cheater !
liar
you cheat with a young girl

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>