You should always use itemIDs anyway. Using item names has a number of flaws, such as restricting your addon to only work in English game clients, failing for items you haven't seem during your play session, etc. IDs are better in every way.
If you really need to compare strings against item names, rather than calling GetItemInfo every time, call it once and store the result in a variable outside of whatever function you're comparing in, then use the variable inside that function:
local SHA_CRYSTAL = GetItemInfo(74248)
Or use GetLootSlotLink instead of GetLootSlotInfo and extract the itemID from the link:
local link = GetLootSlotLink(i)
local id = link and tonumber(strmatch(link, "item:(%d+)"))
However, without knowing your actual goals (eg. why you want to know whether an item is used for enchanting, and what you want to do with that knowledge), it's hard to really offer any specific useful suggestions.