[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-apl] Reading CPU cycle counter
From: |
Juergen Sauermann |
Subject: |
[Bug-apl] Reading CPU cycle counter |
Date: |
Wed, 02 Apr 2014 15:58:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi,
in order to get a better time resolution for benchmarking, I have
added the following in SVN 182:
In C/C++ I have added function cycle_counter() which returns the current
cycle counter
of the CPU if the CPU supports it (and -1 if not).
In APL this functions is available via native function FILE_IO like this:
'lib_file_io.so' ⎕FX 'FILE_IO'
FILE_IO
⍝ read CPU cycle counter
FILE_IO ¯1
31854717246282
⍝ read CPU frequency
FILE_IO ¯2
2329921090
/// Jürgen
- [Bug-apl] Reading CPU cycle counter,
Juergen Sauermann <=