Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for the article!

I started AsmGrid project that provides X86 architecture overview and instruction timings for people like me that often work with assembly. It's basically a simple web application that displays data provided by AsmDB and timings obtained through cult tool (https://github.com/asmjit/cult).

AsmGrid is available here, click on X86 Perf tab to see instruction timings:

  - https://asmjit.com/asmgrid
A bit older version that has more microarchitectures (but less instructions) is here:

  - https://kobalicek.com/asmgrid
I'm also looking for some help with instruction timings. I would be thankful to anyone who has X86 CPU having a different microarchitecture than those available at https://asmjit.com/asmgrid/ and is willing to compile & run cult tool, and provide me its output.

Instructions for cloning and compiling cult are here:

  - https://github.com/asmjit/cult


Thanks for the link, I didn't know about CULT (but I use asmjit, it's a great project).

I do feel like there is a lot of redundancy in this area. You are probably aware of Agner's instruction tables, and he makes the source available for his latency testing tools. You are probably aware of uops.info which has latency/throughput numbers for instructions online and in XML format. Now there is CULT (or actually CULT came before uops.info but I wasn't aware of it), and ASMDB.

There is the AIDA64 instruction latency thing giving the tables at:

http://instlatx64.atw.hu/

There is also uarch-bench which I wrote, which has slightly different goals than just getting the latency/throughput of instructions, but still does a lot of that and has a lot of overlap in other areas.

I have seen more as well, but I can't remember all of them.

Unless you love is really writing these kind of tools (mine is not), it would be nice if there was one winner here: one canonical source for instruction timings, available in whatever format, one test application for new platforms, etc. Then efforts like "please run this on your new hardware" won't be split among various people: right now sometimes Agner gets new hardware first, sometimes the uops.info guys, sometimes the Instlat guy, etc.

Let a thousand flowers bloom and all that, but personally I think this space is due for some collaboration...


Yeah there is definitely some redundancy here, but there were reasons I wrote these tools. There are multiple sources that provide instruction timings. Agner's instruction tables are amazing, but they cover only a single microarchitecture at a time, so it's really difficult to compare multiple microarchitectures. Intel's online intrinsics guide only shows instruction latencies of few latest microarchitectures, etc... Basically before AsmGrid it was time consuming for me to verify whether the instructions I have selected would perform well on a majority of machines that I target.

I wrote AsmGrid initially for myself to explore AsmDB data and to spot possible errors. Then I wrote CULT just for fun as I wanted to see whether it's possible to write such tool based on AsmJit. CULT basically iterates over AsmJit instruction database, checks whether instructions (with various signatures) can be executed, and then creates JIT code for executing them either in parallel or sequencially. It works really well and the testing can be easily done in user space.

In other words, I wanted a table of instructions and their timings where I can compare several microarchitectures at the same time during development and AsmGrid provides that. The only downside is that I cannot test all microarchitectures myself and when I make changes to support more instructions a re-run is necessary.


Right, so CULT is maybe not the redundant one. Maybe the uops.info guys should use CULT, I dunno. Also, if it's for fun, anything goes, of course. I just feel sometimes like there is a lot of division of effort: it would be nice to have a standard single data source for instruction performance attributes.

I am surprised I never ran across this before, because when I found uops.info, I was like "finally, this stuff is online and linkable" - but maybe that already happened earlier with ASMGrid?

Anyways, I can run this on SKL, SKX, CNL for you.


Thanks! Let's continue on that issue page.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: