Notes by Craig Phillips
- There are 11 fallacies of Distributed Computing:
- The network is reliable
- Latency isn’t a problem
- Bandwidth isn’t a problem
- The network is secure
- The topology won’t change
Looking for an efficient pure GO approach to copy repeating patterns into a slice, for a toy project, I ran a few tests and discovered a neat approach to significantly improve performance. For the toy project, I am using this to fill a background buffer with a specific RGB color pattern, so improving this performance significantly improved my acheivable framerate.
All the test were run with a buffer of 73437 bytes, allocated as follows
var bigSlice = make([]byte, 73437, 73437)
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "encoding/hex" | |
| "fmt" | |
| ) |
| import cv2 | |
| cap = cv2.VideoCapture(0) | |
| # Capture frame | |
| ret, frame = cap.read() | |
| if ret: | |
| cv2.imwrite('image.jpg', frame) | |
| cap.release() |
| #include <memory> | |
| #include <iostream> | |
| class objectA { | |
| public: | |
| ~objectA() { | |
| std::cout << "A"; | |
| } | |
| }; |
| import numpy as np | |
| import pandas as pd | |
| import statsmodels.formula.api as sm #lin reg | |
| import pylab as py | |
| import matplotlib as mp | |
| from sklearn.tree import DecisionTreeRegressor | |
| from sklearn.ensemble import ExtraTreesRegressor | |
| from sklearn.ensemble import RandomForestRegressor |
| import numpy as np | |
| import pandas as pd | |
| import statsmodels.formula.api as sm #lin reg | |
| import pylab as plt | |
| import matplotlib as mp | |
| from sklearn.linear_model import Lasso | |
| from sklearn.linear_model import LassoCV | |
| from sklearn.linear_model import lasso_path, enet_path |
| import numpy as np | |
| import pandas as pd | |
| import statsmodels.formula.api as sm #lin reg | |
| import pylab as py | |
| import matplotlib as mp | |
| from sklearn.tree import DecisionTreeRegressor | |
| from sklearn.ensemble import ExtraTreesRegressor | |
| from sklearn.ensemble import RandomForestRegressor | |
| from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor |