3 ms·
And enable OpenMP afterwards, to process the 1 million strings in parallel using all the available cores.
by user5994461 10y ago
And enable OpenMP afterwards, to process the 1 million strings in parallel using all the available cores.
- R_haterade 10y agoI'm learning Omp right now, and I'm excited about it, but my sarcasm filter is off today--are you serious about this? What about the inability to exit a parallel region--I was under the impression that once you start a parallel for, you can't exit it until it's run through the entire iteration.
- KayEss 10y agoI hate it when libraries try this sort of thing. I've already used all of the cores higher up in the program logic where it's far more effective, but doing that all the library is going to achieve is a net slow down of all throughput. Don't blindly throw work at multiple cores low down in algorithms. Amdahl's law tells you that the pay off is likely low, and if the program already makes proper use of the cores you're just going to slow things down.
- user5994461 10y agoAgreed that library needs to think about how programs will interact with them. That program is just a benchmark to map millions of string to integers, it's valid to optimize processing.