what the advantages of QSTR,it's only to avoid duplication of strings and reduce rom size?
Micropython uses a hash table index string but does not faster than original string.
what the advantages of QSTR
Re: what the advantages of QSTR
QSTR is a mechanism for string interning. It basically lets you replace a string with a number. This has numerous advantages: first, as you noted, it saves some flash size, since the string doesn't have to be stored multiple times; second, it also saves memory, since the string itself is stored in flash, and in memory you can simply just store the number; third, it speeds up comparisons, especially for strings that have a common prefix -- with normal strings, you need to compare them byte by byte, until you hit a character that is different; comparing numbers is much easier and pretty much instant.
Re: what the advantages of QSTR
your reply is very detail and wonderful,i got mush knowledge about QSTR from you ,thanks.