Is there a faster way?

Original query:

--takes roughly 36 ns per call for my benchmark set
CREATE OR REPLACE FUNCTION my_dist(text[], text[]) 
 RETURNS double precision
 LANGUAGE sql
 IMMUTABLE
AS $$
select count(*)::double precision from ((select * from unnest($1) except select * from unnest($2)) union all
(select * from unnest($2) except select * from unnest($1))) foo
$$;