1,563 reputation
713
bio website blog.piechotka.com.pl
location Munich, Germany
age 25
visits member for 3 years, 10 months
seen 12 hours ago

Jul
12
comment How can a true Vector be implemented in Haskell?
To some extend in the same way as how to store a value in register in say C or C++, or you free memory in GC language - compiler is free to rearrange data, put the values in register etc. or expose the things by (extensions)[tinyurl.com/ovvxtqt]/(libraries)[http://hackage.haskell.org/… to programmers if they really need them - but assumption is that they don't care in most cases. In similar way Haskell programmers don't care in most cases if the data is packed in sequential region of memory instead of, for example eliminating the need for evaluation entirely.
Jul
9
answered Referencing official documentation in source-code documentation
Jul
8
comment Pointer indexing
@BartvanIngenSchenau - ups. sorry - it looks like I implied instead of saying a bit too much. What I meant is that they are fast enough for debugging while too slow for production - and if the hit would be acceptable probably more HL language then C is probably preferable - so in a sense the severeness is dependent on context (debug vs. release).
Jul
8
comment Pointer indexing
@BartvanIngenSchenau depending on what you mean by 'severe performance hit' there is symbolic execution for C (for example clang+klee) as well as sanatizers (asan, tsan, ubsan, valgrind etc.) which tend to be very useful for debugging.
Jun
15
answered Why do programmers still use mailing lists?
Jun
13
revised Memory read/write access efficiency
added 572 characters in body
Jun
13
answered Memory read/write access efficiency
Jun
13
comment Memory read/write access efficiency
@wolfPack88 check matrix multiplication program for (int i = 0; i < size; i++) for (int j = 0; j < size; j++) for (int k = 0; k < size; k++) c[i,j] += a[i,k] * b[k,j]; with various permutation of loops. For size take sufficiently big number to fill the cache by the single matrix (preferably aligning to cache line). You'll find one that the most efficient one is when you 'stream' the data i.e. access values consecutive in memory and in worst case when you accesses data 'randomly'. BTW. for simple cases (such as matrix?) polyhedral compilers can optimize the code nowadays.
Jun
13
comment Memory read/write access efficiency
In general I would consider for HPC the last option but not necessarly in the trivial interpretation - in practice the data access and algorithm should be codesigned for particular platform (do you stream by row or column, do you need 'random access' and how it is structured, what's cache coherency of platform, how long is cache line etc.). However for most of linear algebra you have already optimized libraries such as BLAS, SPARSE etc.
Jun
13
comment Memory read/write access efficiency
@wolfPack88 for large data (HPC) I would imagine that you want to make the data close to each other to exploit the physical and temporal locality. I would imagine option 3 with alignment to cache line size of row might be most efficient if you would stream the data in correct way. On the other hand it would be least efficient if you have low associativity in cache and you will stream incorrectly as the processors starts trashing data. It would also depend on partitioning the data across machines (assuming you have single address space).
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@MSalters Nitpicking clang would emit 'something like that' if you treat LLVM ISA as 'something like that' (it's SSA not stack based). Given that it's possible to write JVM backend for LLVM and JVM ISA (AFAIK) is stack based clang->llvm->JVM would look very similar.
May
9
comment Should my source code be in UTF-8?
@leflings - probably a default environment encoding which currently is usually UTF-8.
Mar
7
comment Regarding interpreters
@amon - do you have a reference? I'd expect it to be terribly slow due to underutilizing i$ and branch prediction. I thought that JVM JITtes bytecode to native code in 'fast mode' (without any optimization etc. - just using stack and jumps) and then reJITted with optimization if the code is a hot spot. I'm not a JVM expert though.
Mar
4
comment What should I do when I've already waited too long between commits?
@Aaronaught I'd add that yourself 3 months later can constitute an 'another programmer'.
Mar
2
comment What should I do when I've already waited too long between commits?
@StephenC is not using such tools not typical or is the need not typical? With former I have no idea (it might be a case) but with latter one-person project/branch have regressions/problems as any other (at least mine do - maybe I'm just bad programmer) so it makes sense to use standardized tools to find out problems. I'm guilty of too big commits as any other person but git-bisect turned invaluable when I introduced a severe regression a week before my master's project deadline (stale compilation files marked test as passing due to corrupted mtime).
Feb
28
comment Programs that claim they are not “multi-core” friendly
I have a feeling that your cautionary tale lacks an 'punch line' - what's your point - is it 'parallelisation not always work' (skimming through answer I got this idea)? 'it's not a quick fix - you need to be aware about tradeoffs' (for e.x. fine/coarse parallelism)? 'If you optimize know you architecture' (for e.x. what's cache coherence, what's cache line size etc.)? 'Optimization is hard - you need to have background knowledge and experiment'? There is something left unsaid and I am not sure where were you getting at (or maybe I'm just skewed by HPC).
Feb
28
comment What should I do when I've already waited too long between commits?
@StephenC for example because it breaks tools like git-bisect. If code compiles/runs all the time and you need to find a regression if it compiles all the time you can just binary search (not mentioning that if there is regression in the chunk of code you are left with big change to read instead of narrowing it down).
Feb
27
comment What exactly is procedural programming? How exactly is it different from OOP? Is it the same as functional programming?
It might be good to remove mentioning of interface in OOP description as it has much more general definition outside OOP - interface as in AP*I* or AB*I* or for that matter GU*I* and CL*I* - as opposed as a 'type of purly abstract class which can be multiply-inherited present in some OO languages such as Java/.Net but not in others (say Python, Ruby, Smalltalk, JavaScript, C++, ...)'.
Feb
26
comment How to address the concerns of the software architect but still maintain collective code ownership?
@Gangnus it's getting really off-topic but as an example of larger company which do use reviews see Google - they seems to mention also similar arguments.
Feb
26
comment How to address the concerns of the software architect but still maintain collective code ownership?
@Gangnus - for that case you have "if not" and majority of my comment.