For these products, precise latency figures are application dependent and difficult to obtain. However, Accelize claims their smart NICs can turn around financial trades on the FPGA in under 2µs. This is significantly lower than the minimum latency achievable with software, as discussed earlier.
Python 2.7.13 (default, Apr 4 2017, 08:47:57)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def cycle():
... for x in range(100):
... print x
...
>>> import time
>>> def measure():
... t1 = time.time()
... cycle()
... t2 = time.time()
... return t2 - t1
...
>>> print measure()
0
1
# ... skipped ...
98
99
0.000275135040283
>>>
def measure():
t1 = time.time()
for _ in range(10):
for _ in range(10):
for _ in range(10):
for _ in range(10):
for _ in range(10):
cycle()
t2 = time.time()
return t2 - t1
32.5 second on my laptop, why? (Using the highly scientific approach of only taking one measure).Your cycle() time is roughly e*10E-5.
That would mean that the code below runs in 148.4123 seconds?
There is an obsession in the brainteasersforum discussing weird method of computing [$]e^5[$]. I though this was a new method but it's not very accurate!32.5484418869 on my laptop, why?Your cycle() time is roughly e*10E-5.
That would mean that the code below runs in 148.4123 seconds?
That's a JIT optimised e! When you do HFT, you need to tune your constants, too.There is an obsession in the brainteasersforum discussing weird method of computing [$]e^5[$]. I though this was a new method but it's not very accurate!32.5484418869 on my laptop, why?Your cycle() time is roughly e*10E-5.
That would mean that the code below runs in 148.4123 seconds?
Ah, yes, I forgot the HFT JIT correction factor of [$]\sqrt{21}[$]!That's a JIT optimised e! When you do HFT, you need to tune your constants, too.There is an obsession in the brainteasersforum discussing weird method of computing [$]e^5[$]. I though this was a new method but it's not very accurate!32.5484418869 on my laptop, why?
What can possibly go wrong!..People were running low-latency strategies from Perl or KDB, nothing new here.