From: Sebastian Kulesz <sebi...@gmail.com> >> Why not simply write benchmark? how tipycally geek-like response, well Sebastian has the right response lest explaint more: >> > > A benchmark wouldn't be accurate, as it will be IO bound, and being an old of course, the benchmark software will run in same machine (the only case possible) for tests, so then this implice extra I/O and also extra CPU cycles.. jeje > Besides, first option can fail if you don't have write access to the file, > thus needing a third access to check for permission to delete. of course, but the code of if-else logic of gambas will improve the answer, if code of if-else combined with the disk write verify (a simple ls shell no complicated gambas focused function) has less cycles rather than the try-catch, then if-else are more faster ..
of course, assuming the write access, if only interest the verification the if-else its so far the most faster.. but: > If you want to analyze the access to disk, the Try/Catch will access n > times the disk, n the amount of files. The <If Exist(...) Then Kill ...> that's the real true! > will access the disk at least n and at most 2n. 3n at most if you check for > write permissions. in any cae, i have some test, simple, 120 threath trying to do the same action, in bot cases, and the if-else are more faster, of course, assuming write-access enabled! the right usage are the try-catch, the faster are if-else ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user