==, ===, Object.is(value1, value2) are used in JavaScript to compare values. This will return true or false. I want to know if there is any memory usage difference between these comparators.
example usages, if (value1 == value2) {}
if (value1 === value2) {}
if (Object.is(value1, value2) {}
Went through the documentation.
This isn't that easy to answer because that's entirely implementation dependent. This kind of "under-the-hood behavior" isn't specified/standardized by ECMA so you'd have to benchmark some JavaScript engines individually.
Lets take V8 for example: If you compare the same types, both
==and===use the exact same algorithm. In theory==should always be slower than===because "equals" actually calls "strict equals" internally. But the memory usage difference is so small that you can't even accurately benchmark it, given that other factors are involved as well.But then again, it entirely depends on the implementation and I'd say the actual differences in terms of memory usage are completely insignificant.
So to actually answer your question:
There will always be some difference, but it's nothing you'll ever notice.