Take advantage of the frozenset constant optimization.
diff --git a/Lib/_markupbase.py b/Lib/_markupbase.py
index adf6ba2..98b9037 100644
--- a/Lib/_markupbase.py
+++ b/Lib/_markupbase.py
@@ -122,7 +122,7 @@
                 # this could be handled in a separate doctype parser
                 if decltype == "doctype":
                     j = self._parse_doctype_subset(j + 1, i)
-                elif decltype in ("attlist", "linktype", "link", "element"):
+                elif decltype in {"attlist", "linktype", "link", "element"}:
                     # must tolerate []'d groups in a content model in an element declaration
                     # also in data attribute specifications of attlist declaration
                     # also link type declaration subsets in linktype declarations
@@ -145,10 +145,10 @@
         sectName, j = self._scan_name( i+3, i )
         if j < 0:
             return j
-        if sectName in ("temp", "cdata", "ignore", "include", "rcdata"):
+        if sectName in {"temp", "cdata", "ignore", "include", "rcdata"}:
             # look for standard ]]> ending
             match= _markedsectionclose.search(rawdata, i+3)
-        elif sectName in ("if", "else", "endif"):
+        elif sectName in {"if", "else", "endif"}:
             # look for MS Office ]> ending
             match= _msmarkedsectionclose.search(rawdata, i+3)
         else:
@@ -203,7 +203,7 @@
                 name, j = self._scan_name(j + 2, declstartpos)
                 if j == -1:
                     return -1
-                if name not in ("attlist", "element", "entity", "notation"):
+                if name not in {"attlist", "element", "entity", "notation"}:
                     self.updatepos(declstartpos, j + 2)
                     self.error(
                         "unknown declaration %r in internal subset" % name)