Inverting a binary tree using x64 assembly
sanket.tech
Inverting a binary tree using x64 assembly
1–10 of 73 posts
Re: Inverting a binary tree using x64 assembly
#2x32 converter for GNU/Linux:
sed -i 's/r//g' invert_tree.asm > invet_tee.asmRe: Inverting a binary tree using x64 assembly
#3You can use the 32bit xor to reset the register. Also TEST REG,REG might be better for checking if it’s zero.
Re: Inverting a binary tree using x64 assembly
#4I love seeing people solve leetcode challenges in asm, are there any more blogposts like this?
Re: Inverting a binary tree using x64 assembly
#5x32 converter for GNU/Linux: sed -i 's/r//g' invert_tree.asm > invet_tee.asm
It's not that easy, you also have to account for the pointer sizes (4 bytes instead of 8). Also alignment requirements are different on x32.
Re: Inverting a binary tree using x64 assembly
#6This doesn't actually invert a Merkle tree though, since you have to recompute the hashes (except the leaf hashes) when you invert a Merkle tree. Gonna be a no-hire evaluation from me dawg.
Re: Inverting a binary tree using x64 assembly
#7This doesn't actually invert a Merkle tree though, since you have to recompute the hashes (except the leaf hashes) when you invert a Merkle tree. Gonna be a no-hire evaluation from me dawg.
The tweet this is based on is a joke. To invert a Merkle tree would mean to invert cause and effect. I’m pretty sure the tweet author is implying they want you to find a hash key collision for each node. Hope you have a couple spare universes in your pockets because this is gonna take a while.
Re: Inverting a binary tree using x64 assembly
#8x32 converter for GNU/Linux: sed -i 's/r//g' invert_tree.asm > invet_tee.asm
x16, you mean :D
Re: Inverting a binary tree using x64 assembly
#9I love seeing people solve leetcode challenges in asm, are there any more blogposts like this?
The hard bit of solving them is usually the algorithm though - when you know that you can code it in anything.
Re: Inverting a binary tree using x64 assembly
#10> I will be using x64 assembly with the AT&T syntax as it is objectively superior than the Intel syntax.
This made me laugh because it must be a reference to this: https://news.ycombinator.com/item?id=33652023
> I contend that the AT&T syntax is harmful and bad, and should never be used, for any reason, under any circumstances, by anyone.