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

(defun t_ssget_layerCMulti ( count fptr / time1 time2 filterMulti en )
  (setq en (entmakex (list (cons 0 "POINT")(cons 8 "192")(cons 10 '(0 0 0)))))
  ;;-----------------------------
  (setq filterMulti
    '((-4 . "<OR")
      (8 . "0")
      (8 . "192")
      (8 . "193")
      (8 . "194")
      (-4 . "OR>")
     )
  )
  ;;-----------------------------
  (setq time1 (getvar "MILLISECS"))
  (if (not time1) (setq time1 (getvar "TDUSRTIMER")))
  (if (not time1) (setq time1 0.0))

  (repeat count
    (ssget "X" filterMulti)
  )

  (setq time2 (getvar "MILLISECS"))
  (if (not time2) (setq time2 (getvar "TDUSRTIMER")))
  (if (not time2) (setq time2 0.0))
  ;;-----------------------------    
  (entdel en)
  ;;-----------------------------
  (setq bench$seconds (if hasMilliSecs (* 0.001 (- time2 time1)) (* 86400.0 (- time2 time1))))
  (princ (strcat "* SSGET filterCMulti : " (rtos bench$seconds 2 3) "\n"))
  (if fptr
    (princ (strcat "* SSGET filterCMulti : " (rtos bench$seconds 2 3) "\n") fptr)
  )
  bench$seconds
)

(defun t_ssget_layerCSingle ( count fptr / time1 time2 filterSingle en )
  (setq en (entmakex (list (cons 0 "POINT")(cons 8 "192")(cons 10 '(0 0 0)))))
  ;;-----------------------------
  (setq filterSingle '((8 . "0,192,193,194")))
  ;;-----------------------------
  (setq time1 (getvar "MILLISECS"))
  (if (not time1) (setq time1 (getvar "TDUSRTIMER")))
  (if (not time1) (setq time1 0.0))

  (repeat count
    (ssget "X" filterSingle)
  )

  (setq time2 (getvar "MILLISECS"))
  (if (not time2) (setq time2 (getvar "TDUSRTIMER")))
  (if (not time2) (setq time2 0.0))
  ;;-----------------------------    
  (entdel en)
  ;;-----------------------------
  (setq bench$seconds (if hasMilliSecs (* 0.001 (- time2 time1)) (* 86400.0 (- time2 time1))))
  (princ (strcat "* SSGET filterCSingle : " (rtos bench$seconds 2 3) "\n"))
  (if fptr
    (princ (strcat "* SSGET filterCSingle : " (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_ssget_layerCMulti  (* 20 $benchcyclesfactor) nil)
  (t_ssget_layerCSingle (* 20 $benchcyclesfactor) nil)
  (setvar "cmdecho" 1)
  (princ)
)
