Json class dict store in variables

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Json class dict store in variables

Post by deshipu » Thu Sep 14, 2017 3:44 pm

Considering how MicroPython tries to stay small and simple, and to keep only one way of doing things, I doubt this would be accepted. The "pixel" and "fill" methods are there for compatibility with the initial API which didn't use framebuf, I assume.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Json class dict store in variables

Post by pythoncoder » Fri Sep 15, 2017 4:37 pm

deshipu wrote:...I doubt this would be accepted...
You're almost certainly right :( But when I looked at it I found the performance of the pixel() method was improved by a factor of nearly 3 with this trivial change https://github.com/micropython/micropython/pull/3318. It removes the overhead of a method call and a data member lookup. Worth a punt, anyway ;)
Peter Hinch
Index to my micropython libraries.

Post Reply