You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added: find.shared on name_finder's answer: every name two or more elements hold, each a NameShared (name, elements), in the order each name was first met. name is the name as it is compared (trimmed, and folded when case is "folded"); elements is a tuple of the objects that were passed in, in the order given. find never answers such a name, and until now nothing said it was there: a tool reads the list to tell a writer why a name stays plain, or to test that no two elements of a world share one. A name too short to be looked for is not on it. shared is a read-only tuple, read once when the finder is made. New public names: NameFinder (what name_finder answers, called on a text as before) and NameShared.
Changed: name_finder reads a text once, whatever the names. The work for one text was at most its length times the longest name's length, and a long name whose opening words the text repeats reached that: one 5,000-character name against 400,000 characters of its first word ran for more than a minute. The names are now held as one matcher with failure links and the text is read once from its end to its start, so the work grows with the text's length alone: that case takes about a twentieth of a second. No answer moves: the 47 cases of 0.141.0 stand, with 15 more (names that end other names, names of marks alone, names nested in one another, overlaps, a name that ends in a mark against an address, and what find.shared lists). Finding names in ordinary prose costs about what it did (12 ms where it was 14, for 15,000 names over 100 KB of prose), and reading the names about 1.7 times as long.