As comments said:

    /* Note that we can't flag set as fast, since it may perform an
     * implicit DEL of a large key. */
     {"set",setCommand,-3,
     "write use-memory @string",
     0,NULL,1,1,1,0,0,0},

I think GETDEL and GETSET are like SET, they may perform an implicit DEL of a large key too.

Comment From: oranagra

nice catch! (i took me a while to figure that out too, maybe a comment is needed). the reason is that SET can override a key of any time (e.g. a huge list). but GETDEL and GETSET, GETEX can all only work on string type keys, deleting these is O(1) (even if the string is long).

Comment From: huangzhw

thanks. I forgot that SET can override a key of different type. I thought this means long string.