home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,808 of 4,675   
   Rick C. Hodgin to Bart   
   Re: Fast conversion to a boolean of 0 or   
   08 Mar 19 05:14:17   
   
   From: rick.c.hodgin@gmail.com   
      
   On Friday, March 8, 2019 at 7:52:40 AM UTC-5, Bart wrote:   
   > I wasn't able to compile your program using CL.EXE (didn't seem to   
   > recognise _asm).   
      
   I sent you this previously, but am still under moderation so you'll   
   receive these at the same time most likely.   
      
   Compile it as a 32-bit executable.  In Visual Studio 2015 I used   
   these settings for the command lines:   
      
   cl.exe:   
      
       /GS /analyze- /W3 /Zc:wchar_t /ZI /Gm /Od /Fd"Debug\vc140.pdb"   
       /Zc:inline /fp:precise /Zp1 /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32"   
       /D "_DEBUG" /D "_CONSOLE" /errorReport:prompt /WX- /Zc:forScope   
       /RTC1 /Gd /Oy- /MTd /Fa"Debug\" /EHsc /nologo /Fo"Debug\" /FAs   
       /Fp"Debug\test1.pch"   
      
   ilink.exe:   
      
       /OUT:"Debug\test1.exe" /MANIFEST /NXCOMPAT /PDB:"Debug\test1.pdb"   
       /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib"   
       "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib"   
       "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG   
       /MACHINE:X86 /INCREMENTAL /PGD:"Debug\test1.pgd" /SUBSYSTEM:CONSOLE   
       /MANIFESTUAC:"level='asInvoker' uiAccess='false'"   
       /ManifestFile:"Debug\test1.exe.intermediate.manifest"   
       /ERRORREPORT:PROMPT /NOLOGO /ASSEMBLYDEBUG /TLBID:1   
      
   > What I wanted to test was how long an empty for-loop would take. (I   
   > assume you would compile without optimisations to make sure it doesn't   
   > just get rid of such a loop.)   
      
   Optimization was disabled.  In my original post I included this:   
      
       "Code in Visual Studio, compiled in debug mode no   
        optimization, in x86 mode:"   
      
   > Since I was curious as to how much of those 2 seconds is overheads.   
      
   I didn't consider it a factor since each program would incur the   
   same overhead.  I did consider the function location being a nearer   
   call and therefore possibly in the same cache line, but it doesn't   
   seem to matter on repeated tests.   
      
   --   
   Rick C. Hodgin   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca