On 21/04/2017 9:41 PM, David W Noon wrote:
On Fri, 21 Apr 2017 21:22:04 +0800, David Crayford ([email protected])
wrote about "LLVM ( wasRe: Swift on z/OS (was Data/hiperspaces (was: ...
4G bar?))" (in <[email protected]>):
[snip]
IBM have ported LLVM/clang to z/OS. The beta of swift gives the game away
I have been using clang and LLVM on IA32 and AMD64 hardware for some few
years now. The optimization of C/C++ code is quite good.
I've been using clang on x86 Linux and I prefer it to gcc/g++. I can't
see IBM releasing it on z/OS though!
DOC:/u/doc: >swiftc --version
Swift version 3.0-dev (LLVM , Clang , Swift )
Target: s390x-ibm-zos
Interestingly they have a libbsd.a static library which appears to be a
shim of the the BSD C/C++ runtime library.
No. The libbsd.a library contains some idiosyncratic, but more rational,
variants of Standard C Library functions, particularly for string
handling. I have been using these routines for some years too, and I
generally prefer them to the ISO standard functions. Look for functions
like strlcpy() and strlcat() as alternatives to strncpy() and strncat().
You right. I just took a look at the header files and it's pretty
sparse. Everybody that codes C
hand-rolled the strl* functions years ago. There's some very interesting
functions in __zosspec.h wrt byte swapping
using inline assembly. Looks like RISC code!
Right now compiling Swift programs is agonizingly slow! And it's missing
the foundation/core library which makes it quite useless to do anything
meaningful.
That won't stop IBM from releasing it as the hot new thing. It could
soon be as fast as Java!
LOL! That may take a while. I compiled one of the simple examples and it
took 15 minutes to compile. That makes a large C++ application with
template meta-programming (boost) look like a speed demon! The
executable was slow too. Java is no slouch on z/OS now, especially
compiles.
It's all good stuff but the node.js port looks more exciting.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN