Settings Finder V2

by Ricardo Fernández Serrata

Version 2 (August 27, 2021)

Download (19 downloads)

More efficient in EVERY aspect. Time, Space, and Energy are efficiently used.

The Fork is only used for responsiveness (because Get Setting and Toast have latency that could prevent Content Changed to detect a new change), you can use a simple loop if you don't need too much responsiveness.

`s[0][3] & 3` exists because dictionaries are expensive, so I tried to find something that allows optimization, and realized that the 4th char of all of them at the rightmost (least significant) bits, matches their IDs ("system" is 0b00, "secure" is 0b01, and "global" is 0b10). I used `& 3` instead of `% 4` because of a benchmark I did on my device where `modulo` was slower than `bit and`. Bitwise ops require 2-way conversions, but they seem faster than software division.

Original: llamalab.com/automate/community/flows/7409

4.0 average rating from 1 reviews

5 stars
0
4 stars
1
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.