andresarmento / modbus-arduino

A library that allows your Arduino to communicate via Modbus protocol, acting as a slave (master in development). Supports serial (RS-232, RS-485) and IP via Ethernet (Modbus IP).
BSD 3-Clause "New" or "Revised" License
453 stars 267 forks source link

AVL tree implementation #48

Open saltyJeff opened 4 years ago

saltyJeff commented 4 years ago

I've implemented a version of this library that replaces the linked list with an AVL tree for managing registers. This changes reads / updates from O(n) to O(log N) which has helped my code a lot.

https://github.com/UCLA-Rocket-Project/daq-slave/tree/master/lib/Modbus

Should I submit a PR? This does have the side effect of increasing code size / bumping insertions to O(log N).