Skip to content

use more efficient search for emoji.gs #9

Open

Description

@faretek1

It would be more efficient to use alphabetical lists for the large lists in emoji.gs (possibly leading to 2 sets of 2 lists) so that you can use a binary search, because scratch '<' operator works with alphabetical (unicode index) order

the existing emoji list might already be in order of emoji, but there is no set that uses a sort of emoji names
Image

(ported from https://github.com/FAReTek1/std/issues/1)

Activity

  1. aspizu commented on Apr 12, 2025

    @aspizu
    Contributor

    goboscript repository has the js script that generated the emoji.gs file

  2. faretek1 commented on Mar 5, 2026

    @faretek1
    Author

    dealing with comparions between strings in scratch is an annoying nuanced thing because scratch converts strings to lowercase before they are compared. this means that simple binary search simply does not work. If it's emoji-only (and not full unicode), this is feasible, but it would need to be benchmarked against the builtin item in list block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions