Just thinking about value type support and one of BItc goals to do
algorithms like SHA1 and mpeg equivalent to c  but what that really means
 is compared to non SIMD c..   The last rust benchmarks compared itself to
non SIMD c and they go pretty well ( single task memory so all stack)  but
the non SIMD benchmarks are no longer relevant because SIMD  is in many
libs these days  and algorithms have become far more conventional GP
integer algorithms .

eg   here are some SIMD algotihms some are in common use.
atoi with a 30 cycle worst case
UTF8- UTF16/ Ascii conversions at over triple the speed of any c routine
256/512 bit pattern/ bit  scans
DOM parser , icxml
http://www.balisage.net/Proceedings/vol10/html/Cameron01/BalisageVol10-Cameron01.html
SIMD sort http://www.vldb.org/pvldb/1/1454171.pdf  /
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.333.1462&rep=rep1&type=pdf
Encryption ,many implementations , eg SHA1 is
http://en.cnki.com.cn/Article_en/CJFDTOTAL-CGGL201207016.htm
mpeg compression
etc etc ..

David published a paper on auto vectorization but i dont think its really
relevant  because
- they used a very heavy compiler  , doing it in a JIT is another story.0
- the data samples were already in easy to vectorized form and in many
cases already using SIMD .. The key to the algortihms above is  putting
them into a form to do SIMD  and thats not easy for  most of them.

Here is a nice discussion on adding support to Java
http://queue.acm.org/detail.cfm?id=1945954 .

Mono has intirinsics which call c intrinsics but this doesnt work well
either  mainly because
- All input and output needs to be marshalled and these calls are very
frequent. ( Im not 100% on this but is the only reason i can see for far
less than SIMD performance unless its the fact its only SSE2)
- Intrinsics are platform specific
-  There is no extention to the language to express the output in a form
that makes it easier to write such algorithms .
- Only supports SSE2 , ie intrinsics are a pain to maintain . 512 bit
support ? Havent even got 256 .

There is work in this area  http://ispc.github.io/  and  vecImp  (
http://www.cdl.uni-saarland.de/projects/vecimp/vecimp_tr.pdf)  are
languages to do help this in a C like language .

Those techniques can work with a value type safe language like rust /bitc
 however there is no exsitng runtime that does these techniques and im not
even sure a JIT could do it ..So you either

1) Give up JIT and say you must have static compile.
2) You static comple this type of code ( as per the paper above  with JNI )
 and deploy it .. which gives the worst of both but can get results quicker
and consider (3) later.
3)  Build your own Runtime  provided the JIT can do what thhe vecimp /ispc
compiler do

None of which are appetising ... Or you say that this is not a systems
language and those very high performance things are done in C in and you
have a GP language like java in which case value type support is of
marginal use ( and the value is more less memory , less pauses , better
type system etc) .

Ben
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to