Settings Finder V2

by Ricardo Fernández Serrata

Version 2 (April 22, 2022)

Download (40 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 from detecting an update), 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 categories 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.5 average rating from 2 reviews

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

Rate and review within the app in the Community section.