3 ms·
Ruby symbols vs. Elixir atoms – what's the difference?
- dchest 3y ago> In Ruby, comparing two symbols requires string comparison, which is slightly slower. Is this true? The docs provide this code for Symbol equality: #define sym_equal rb_obj_equal Which is: VALUE rb_obj_equal(VALUE obj1, VALUE obj2) { if (obj1 == obj2) return Qtrue; return Qfalse; }