Oh, right sorry my bad, it should be obj.hide_viewport = data.get("GlobalId", False) not in guid_list
(or obj.hide_viewport = not data.get("GlobalId", False) in guid_list
).
The reason it doesn't get un-hidden when using ALT H is because hide_viewport
property is a global hidden property (monitor icon), whereas the eye icon is a local hidden property. If you've ever used Autocad it's kind of the same as the light bulb icon and the sun icon. To the point, ALT H will locally unhide objects, but it won't change their global hiden-ness (or however it's called ? ><) .
By the way, to get access to the monitor icon in the outliner expand the sieve icon in the top right and check the monitor icon. 
Then :

Note this is the exact same property as the one you toggle in the object's visibility properties :

The eye icon is a little bit more complicated to use, since it can also rely on a specific view layer, but by default it's the active one. Here's a suggestion :
import bpy
import blenderbim.tool as tool
guids = [] # Your guid list here
bpy.ops.object.select_all(action='DESELECT')
for obj in bpy.context.view_layer.objects:
element = tool.Ifc.get_entity(obj)
if element is None:
obj.hide_set(True)
continue
data = element.get_info()
obj.hide_set(data.get("GlobalId", False) not in guids)
bpy.ops.object.select_all(action='SELECT')
The reason it seems (and certainly is) faster is because using blender operators (expression begginning with bpy.ops
) is notoriously slow. They are by essence user interface operators, and they kind of force a redraw of the interface and a re-calculation of some parameters every time they are executed. You won't notice it when you execute it 1, 10 or 20 times, but for hundreds of calls the hiccup will be significant. Whenever possible it's usually recommended to use lower level API calls. That's also one of the reasons why the BlenderBim logic is getting uncoupled from blender operators by Dion since a few commits already. This allows users to bypass the limitations of blender operators.