When the setting ANSI_WARNINGS is ON, the setting of ARITHABORT has no functional effect; you will get the same result no matter ARITHABORT is ON or OFF.
However, the script above does not reflect this; it reflects the actual setting of ARITHABORT:
SET ARITHABORT OFF
go
DECLARE @ARITHABORT VARCHAR(3) = 'OFF';
IF ( (64 & @@OPTIONS) = 64 ) SET @ARITHABORT = 'ON';
SELECT @ARITHABORT AS ARITHABORT;
go
SET ARITHABORT ON
go
DECLARE @ARITHABORT VARCHAR(3) = 'OFF';
IF ( (64 & @@OPTIONS) = 64 ) SET @ARITHABORT = 'ON';
SELECT @ARITHABORT AS ARITHABORT;
When it comes to performance, the setting of ARITHABORT can lead to some confusion. You have a query that runs in the application that is slow. You extract it and run it on SSMS, and now it's fast! This is because that although ARITHABORT has no functional impact when ANSI_WARNINGS is ON, it is still a cache key. SSMS by default runs with ARITHABORT ON, so the cache entry used by the application is not used and you get a new plan.
Yes, this is very confusing. And I mean very.
For a longer discussion about this, see my article Slow in the Application, Fast in SSMS?.