(setq hasMilliSecs (/= (getvar "MILLISECS") nil))
(setvar "LOGFILEMODE" 0)

(defun t_operator_equal ( count fptr / i time1 time2 lst1 lst2 xxx yyy cons_2_1 cons_2_A 
                                       lst_10 lst_1010 lst_101010
                                       lst_99 lst_9999 lst_999999
                                       lst_nil
                                       )

  ;;--- build data list
  (setq i 0)
  (repeat 10
    (setq lst1 (cons i lst1))
    (setq lst2 (cons i lst2))
    (setq i (1+ i))
  )
  (setq xxx (cons 2 "{"))
  (setq yyy (cons 2 "}"))
  (setq cons_2_1 '(2 . 1))
  (setq cons_2_A '(2 . "A"))
  (setq lst_10 '(10.0))
  (setq lst_1010 '(10.0 10.0))
  (setq lst_101010 '(10.0 10.0 10.0))
  (setq lst_99 '(9.9))
  (setq lst_9999 '(9.9 9.9))
  (setq lst_999999 '(9.9 9.9 9.9))
  (setq lst_nil '(nil))

  ;;-----------------------------
  (setq time1 (getvar "MILLISECS"))
  (if (not time1) (setq time1 (getvar "TDUSRTIMER")))
  (if (not time1) (setq time1 0.0))

  (repeat (* count count)

    (= 1 1)
    (= 1 1 1)
    (= 1 2)
    (= 1 2 3)

    (= 1.0 1.0)
    (= 1.0 1.0 1.0)
    (= 1.0 2.0)
    (= 1.0 2.0 3.0)

    (= 1 1.0)
    (= 1 1.0 1.0)
    (= 1 2.0)
    (= 1 2.0 3.0)
    
    (= 1 "a")
    (= 1.0 "a")
    (= "a" "a")
    (= "a" "a" "b")

    (= lst1 lst2)

    (= lst_10 lst_99 2.0)
    (= lst_1010 lst_9999 2.0)
    (= lst_101010 lst_999999 2.0)

    (= lst_10 lst_nil)

    (= xxx yyy)

    (= cons_2_1 cons_2_1)
    (= cons_2_1 cons_2_A)

  )

  (setq time2 (getvar "MILLISECS"))
  (if (not time2) (setq time2 (getvar "TDUSRTIMER")))
  (if (not time2) (setq time2 0.0))
  ;;-----------------------------

  (setq bench$seconds (if hasMilliSecs (* 0.001 (- time2 time1)) (* 86400.0 (- time2 time1))))
  (princ (strcat "* OPERATOR (=) : " (rtos bench$seconds 2 3) "\n"))
  (if fptr
    (princ (strcat "* OPERATOR (=) : " (rtos bench$seconds 2 3) "\n") fptr)
  )
  bench$seconds
)

;; to increase/decrease the number of bench loops : > 1 increase < 1 decrease
(if (not $benchcyclesfactor) (setq $benchcyclesfactor 1))

;; to run this loaded test manually
(defun C:Run ()
  (setvar "cmdecho" 0)
  (print)
  (t_operator_equal (* 500 $benchcyclesfactor) nil)
  (setvar "cmdecho" 1)
  (princ)
)
