Re: [fpc-pascal] Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 18:18, Dennis Poon wrote: > can we do it in descending order without a user defined enumerator? Not as far as I know - I believe it is a one directional iterator (or so the interface suggests). There are tons of limitations with the for..in construct. Years back I implemented an

Re: [fpc-pascal] Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

2016-06-22 Thread Dennis Poon
I saw your document on for x in ListX loop and would like to reconfirm that it is always iterated in ascending order, right? can we do it in descending order without a user defined enumerator? i.e. for simple enumerated type, is there a construct to iterate through it in descending order?

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread José Mejuto
El 22/06/2016 a las 15:01, Mattias Gaertner escribió: I don't doubt that it is swapping. I would like to know why it is swapping. Is it avoiding hotspots, or for longevity, or turbo boost, or system processes, or security, or Related: What is the downside of pinning the process to a cpu?

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 14:01, Mattias Gaertner wrote: > I don't doubt that it is swapping. I would like to know why it is > swapping. Indeed a good question, and something I've wondered about before. My answer is I don't know. :) When I did Google it before (some years ago), the most frequent answer I

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 13:36:08 +0100 Graeme Geldenhuys wrote: > On 2016-06-22 13:14, Mattias Gaertner wrote: > > On my Linux it does not swap the CPU and I can't find any hard data that > > Windows is swapping because of hotspot problems, > > It’s not just a

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 13:14, Mattias Gaertner wrote: > On my Linux it does not swap the CPU and I can't find any hard data that > Windows is swapping because of hotspot problems, It’s not just a Windows thing. On my FreeBSD system it swaps between CPU cores too. I see this with any long running process

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 07:41:04 -0400 Stephen Chrzanowski wrote: > Everything has a cost. But swapping CPU threads isn't as costly as a fried > CPU. Keeping the CPU cool at all costs is better than having a hotspot on > the die which COULD damage the heat sink. On my Linux

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Stephen Chrzanowski
Everything has a cost. But swapping CPU threads isn't as costly as a fried CPU. Keeping the CPU cool at all costs is better than having a hotspot on the die which COULD damage the heat sink. The computing cost of swapping CPUs is probably close to zero. Your CPU only has so much on-die memory

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 08:02, LacaK wrote: > I know that in theory CPU can switch single thread between cores As Torsten said, that is exactly what happens. It is not “just in theory”, it happens all the time. I see that constantly on my i7 CPU with long running processes. As for the cost of moving it

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread LacaK
I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size) on image, which is stored into memory as 2D byte array. (so only memory access is done and some integer calculations) When I run this application and

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Lukasz Sokol
On 22/06/16 08:07, Torsten Bonde Christiansen wrote: > On 2016-06-22 09:02, LacaK wrote: >> Hi *, >> >> may be that this question is bit off-topic here, but I am sure, that here >> are experts, which know answer ;-) >> >> I have simple Lazarus/FPC application (with no explicit threads) which does

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Torsten Bonde Christiansen
On 2016-06-22 09:02, LacaK wrote: Hi *, may be that this question is bit off-topic here, but I am sure, that here are experts, which know answer ;-) I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size)

[fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread LacaK
Hi *, may be that this question is bit off-topic here, but I am sure, that here are experts, which know answer ;-) I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size) on image, which is stored into