291 karma · joined September 28, 2022
If you test a single array operation with NumPy then it will compare favourably to a low level implementation, but where it generally will lose out is when you’re chaining together multiple operations which a compiler will vectorise more efficiently. For e.g. doing things like add two arrays then multiply them by another array and subtract a constant. If I put that in a C or Rust function I’d expect that to be auto-vectorized using fewer operations than what NumPy will do, and you of course also remove the overhead of the foreign function interface and control returning to the interpreter. On top of that, it’s usually trivial to drop in thread level parallelism in a lower level language, and NumPy doesn’t operate with core level parallelism out of the box for most operations, you have to use something like numexpr to achieve it.
I've personally used OpenMP + SIMD intrinsics or auto-vectorisation to great effect in scientific software and got performance >100x that of NumPy, but it's certainly not a free lunch. The question you have to ask yourself is normally “is it worth it”, and that’s something that can only be answered by profiling, looking at the overhead of maintaining the architecture, and understanding whether the increased friction with debugging and building is worth the hassle. Additionally, if you're doing linear algebra then generally if you're dropping to a lower level language you still will want to be using the same libraries that NumPy etc. uses unless you're exploiting some property of the matrix structure that can make operations more efficient in memory or compute. I worked on one codebase for e.g. where there was a block matrix structure and a hand written implementation of a solver was written because much more efficient operations could be performed with knowledge of that structure.
The main issue is that B2B supports it pretty well, but if you need to say, do something like add an extra attribute dynamically to the JWT tokens, or allow automatic migration from a legacy IdP on first logon, you are forced to use B2C and Custom Policies which are effectively a programming language defined in XML and which are quite nasty to use. In addition to that, B2C doesn’t fully implement all of OIDC so things like client credential flow are still in “Preview” at the moment. Deployment of custom policies is also only by use of a “Preview” API too. It didn’t feel mature enough to me.
You can replicate the same sort of storage of the string length alongside the buffer itself that other languages have by using structs quite easily.
I can’t remember the figures off of the top of my head but I read a report those use cases dominated ARCHER (UK national supercomputer) compute time a few years ago.
I have a LastPass subscription but I’m planning to migrate off of that when the next renewal comes around as I don’t think the cost is justified compared to OSS options and I’m concerned at the recent issues they’ve had.
I used to subscribe to Evernote, but when I left academia I lost the need for that, and I was getting fed up with it getting slower and slower too.
https://www.forestresearch.gov.uk/tools-and-resources/fthr/b...
Fast forward to 2022 and we still don’t have enough renewables, the UK is not very windy at the moment so there’s not enough base load capacity, and we only have 3 active coal fired power stations left. Oh, and we’re in an energy crisis and France, which is normally a net exporter to the U.K., is needing to import energy, making the crisis even closer. It would have been pretty useful to have had a new nuclear power station online right about now.
[1] https://www.newstatesman.com/politics/2011/03/nuclear-power-...
This isn't generally the case; for the most part, a UK resident just answers some questions on application and won't be asked for ID to take out financial products. It's only normally if you fail to verify that you'd be asked that, which might happen if you've got no address/financial history here for e.g.
For online government services all tax/benefits are online and pretty seamless. The things that aren't seamless are much less common - for e.g. renewing driving license I remember being quite painful.
There are “direct debits” that allow companies to draw money from an account, but they can only be set up by businesses, there are special guarantees, etc. etc. that mean the bank is liable to reimburse you immediately under the “Direct Debit Guarantee” if you report a fraudulent transaction.
In the U.K. we’ve had online banking for 20 years now, and telephone banking before that. With most banks you can send an amount up to £25k to any account in the country and the money will be there pretty much instantly. All you need is the name of the person/business and their 6-digit sort code and 8 digit account number. Since about 18 months ago, it automatically warns you if the persons name doesn’t match on the name on the account. We’ve had chip cards and PIN rather than signature in Europe since the early 2000s, and contactless cards started being launched in 2007.
jobs:
unit-tests:
runs-on: python:3.8.15-slim-buster
- name: "Run tests"
working-directory: ./bin
run: unit-tests.shGenerally you want to aim for writing things in scripts that your CI system calls, so that they can be run locally trivially and so that migrating away from one CI provider (for whatever reason - cost, employer decides to shift, etc.) is not a huge piece of work.
The thing I’m trying to do is write things I would have liked to read myself, because it would have saved me time in my day to day work, or because it’s interesting to me.
When I first learnt Python about 10 years ago, I found it much more common to install things from package managers because at the time, wheels had only just been proposed with PEP427 and so there was a lot more compiling from source if you installed things from PyPi. For similar reasons, Conda was popular.
These days, as long as you’re on a reasonably well supported platform (x86_64, ARM, and not Alpine Linux) and recent-ish version of Python (>3.7), then you can probably get a new binary version of most dependencies very quickly.
The first time I used GH Actions I thought there was a strong vendor lock-in element to it which I wasn't hugely comfortable with. I'm a big fan of using GitLab CI these days which seems to be a good trade off between various considerations.
http://hplgit.github.io/num-methods-for-PDEs/doc/web/index.h...
http://hplgit.github.io/num-methods-for-PDEs/doc/pub/index.h...
When I studied Physics, I did 2 years (4 semesters) of C++. Nowadays, nobody would do that, you'd learn Python by default.
He also wrote an excellent book about Chernobyl which I read last year.