i look into map key compare key about string,it will use runtime·memequal, 
i thing the stra == strb will call memequal  two.


On Wednesday, February 10, 2021 at 6:12:18 PM UTC+8 xie cui wrote:

> compare two byte slice,will convert to compare between two string, and my 
> question is how golang compare two string, i don't think that it just 
> compare the len and then comapare bytes in string one byte by one byte, it 
> should have some optimization?where is the code in compiler generate the 
> compare codes?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c58730bd-86d8-4090-8093-eb0a004df22cn%40googlegroups.com.

Reply via email to