       else if pattern1 instanceof Empty
         pattern2
       else
-        new Interleave(pattern1, pattern2)
+        i = new Interleave(pattern1, pattern2)
+        hash = i.hash()
+        patternIntern["internCheck"] += 1
+        unless patternIntern[hash]?
+          patternIntern[hash] = i
+        else
+          patternIntern["internSuccess"] += 1
+        return patternIntern[hash]
 
     after: (pattern1, pattern2) ->
       if pattern1 instanceof NotAllowed

  ###
  class MissingContent extends NotAllowed
    constructor: (@message, @pattern, @childNode, @priority = 10) ->
    toString: ->
      if @message
        "missingContent { #{@message} }"

    constructor: (pattern1, pattern2) ->
      @pattern1 = getPattern pattern1
      @pattern2 = getPattern pattern2
      super()
    choiceLeaves: ->
      l1 = @pattern1.choiceLeaves()
      l2 = @pattern2.choiceLeaves()
